This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
@Override
public int compare(Node node1, Node node2) {
assert node1.getDisplayName() != null : node1 + " has display name.";
String d1 = node1.getDisplayName();
assert node2.getDisplayName() != null : node2 + " has display name.";
String d2 = node2.getDisplayName();
return node1.getDisplayName().compareToIgnoreCase(node2.getDisplayName());
if(d1 == null) {
d1 = "";
}
if(d2 == null) {
d2 = "";
return d1.compareToIgnoreCase(d2);