made the test symmetric

This commit is contained in:
Kohsuke Kawaguchi committed 2011-10-10 18:54:54 +09:00
1 parent 940ba75b6f
commit 093f21f634
1 file changed
+1 -1
@@ -76,7 +76,7 @@ public class ExtensionComponent<T> implements Comparable<ExtensionComponent<T>>
if (a<b) return 1;
// make the order bit more deterministic among extensions of the same ordinal
if (this.instance instanceof Descriptor) {
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());