Skip to content
Permalink
Browse files

[FIXED JENKINS-14667] JDK installation failed on some slaves with Inv…

…alidClassException: hudson.tools.JDKInstaller$Platform$1; local class incompatible: …
  • Loading branch information
jglick committed Sep 14, 2012
1 parent 8b8e751 commit 8a1b069a86a4282343047825487e43d767601f86
Showing with 12 additions and 5 deletions.
  1. +3 −0 changelog.html
  2. +9 −5 core/src/main/java/hudson/tools/JDKInstaller.java
@@ -55,6 +55,9 @@
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=bug>
JDK installation failed on some slaves with <code>InvalidClassException: hudson.tools.JDKInstaller$Platform$1; local class incompatible: …</code>
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-14667">issue 14667</a>)
<li class=rfe>
Provide symlink support on all possible platforms when using Java 7+, including newer versions of Windows.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-13202">issue 13202</a>)
@@ -490,11 +490,7 @@ public boolean is(String line) {
* Determines the platform of the given node.
*/
public static Platform of(Node n) throws IOException,InterruptedException,DetectionFailedException {
return n.getChannel().call(new Callable<Platform,DetectionFailedException>() {
public Platform call() throws DetectionFailedException {
return current();
}
});
return n.getChannel().call(new GetCurrentPlatform());
}

public static Platform current() throws DetectionFailedException {
@@ -504,6 +500,14 @@ public static Platform current() throws DetectionFailedException {
if(arch.contains("sun") || arch.contains("solaris")) return SOLARIS;
throw new DetectionFailedException("Unknown CPU name: "+arch);
}

static class GetCurrentPlatform implements Callable<Platform,DetectionFailedException> {
private static final long serialVersionUID = 1L;
public Platform call() throws DetectionFailedException {
return current();
}
}

}

/**

0 comments on commit 8a1b069

Please sign in to comment.
You can’t perform that action at this time.