fixed a bug. Some descriptors return null from their display name

This commit is contained in:
Kohsuke Kawaguchi committed 2011-05-04 11:35:33 +02:00
1 parent 662fa18a11
commit 6243cf5541
1 file changed
+1 -1
@@ -77,7 +77,7 @@ 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) {
return ((Descriptor)this.instance).getDisplayName().compareTo(((Descriptor)that.instance).getDisplayName());
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());
}