Skip to content

Commit

Permalink
Fix for JENKINS-5922 - workaround for CertificateReaderInputStream
Browse files Browse the repository at this point in the history
(cherry picked from commit 136ab1c)
  • Loading branch information
vjuranek committed May 19, 2011
1 parent 20fe631 commit 41dc24f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions remoting/src/main/java/hudson/remoting/Which.java
Expand Up @@ -117,6 +117,12 @@ public static File jarFile(Class clazz) throws IOException {
Field f = is.getClass().getDeclaredField("delegate");
f.setAccessible(true);
delegate = f.get(is);
//JENKINS-5922 - workaround for CertificateReaderInputStream; JBoss 5.0.0, EAP 5.0 and EAP 5.1
if(delegate.getClass().getName().equals("java.util.jar.JarVerifier$VerifierStream")){
f = delegate.getClass().getDeclaredField("is");
f.setAccessible(true);
delegate = f.get(delegate);
}
}
Field f = delegate.getClass().getDeclaredField("this$0");
f.setAccessible(true);
Expand Down

0 comments on commit 41dc24f

Please sign in to comment.