Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-14667] Another case.
  • Loading branch information
jglick committed Sep 14, 2012
1 parent 8a1b069 commit 9b0e1fb
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions core/src/main/java/hudson/tools/JDKInstaller.java
Expand Up @@ -546,11 +546,7 @@ private static Preference must(boolean b) {
* Determines the CPU of the given node.
*/
public static CPU of(Node n) throws IOException,InterruptedException, DetectionFailedException {
return n.getChannel().call(new Callable<CPU,DetectionFailedException>() {
public CPU call() throws DetectionFailedException {
return current();
}
});
return n.getChannel().call(new GetCurrentCPU());
}

/**
Expand All @@ -566,6 +562,14 @@ public static CPU current() throws DetectionFailedException {
if(arch.contains("86")) return i386;
throw new DetectionFailedException("Unknown CPU architecture: "+arch);
}

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

}

/**
Expand Down

0 comments on commit 9b0e1fb

Please sign in to comment.