mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-03 15:15:54 +00:00
[FIXED JENKINS-14983] hpi:run fails with IllegalAccessError.
This commit is contained in:
1 parent
fc67a14cb0
commit
eb7a23f9b6
3 files changed
+16
-6
No files matched your search
@@ -26,6 +26,8 @@ package hudson;
|
||||
|
||||
import hudson.model.Describable;
|
||||
import hudson.model.Descriptor;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import jenkins.ExtensionFilter;
|
||||
|
||||
/**
|
||||
@@ -38,6 +40,7 @@ import jenkins.ExtensionFilter;
|
||||
* @see ExtensionFilter
|
||||
*/
|
||||
public class ExtensionComponent<T> implements Comparable<ExtensionComponent<T>> {
|
||||
private static final Logger LOG = Logger.getLogger(ExtensionComponent.class.getName());
|
||||
private final T instance;
|
||||
private final double ordinal;
|
||||
|
||||
@@ -90,9 +93,14 @@ public class ExtensionComponent<T> implements Comparable<ExtensionComponent<T>>
|
||||
|
||||
// make the order bit more deterministic among extensions of the same ordinal
|
||||
if (this.instance instanceof Descriptor && that.instance instanceof Descriptor) {
|
||||
return Util.fixNull(((Descriptor)this.instance).getDisplayName()).compareTo(Util.fixNull(((Descriptor)that.instance).getDisplayName()));
|
||||
} else {
|
||||
return this.instance.getClass().getName().compareTo(that.instance.getClass().getName());
|
||||
try {
|
||||
return Util.fixNull(((Descriptor)this.instance).getDisplayName()).compareTo(Util.fixNull(((Descriptor)that.instance).getDisplayName()));
|
||||
} catch (RuntimeException x) {
|
||||
LOG.log(Level.WARNING, null, x);
|
||||
} catch (LinkageError x) {
|
||||
LOG.log(Level.WARNING, null, x);
|
||||
}
|
||||
}
|
||||
return this.instance.getClass().getName().compareTo(that.instance.getClass().getName());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user