Skip to content

Commit bce7b69

Browse files
committed
AbstractUIDetails: fix potential comparison NPE
Theoretically, no object should have a null title. But just in case, let's use the null-friendly MiscUtils.compare method for titles, too.
1 parent 11e439c commit bce7b69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/scijava/AbstractUIDetails.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ public int compareTo(final Prioritized that) {
235235
// compare titles
236236
final String thisTitle = getTitle();
237237
final String thatTitle = uiDetails.getTitle();
238-
return thisTitle.compareTo(thatTitle);
238+
return MiscUtils.compare(thisTitle, thatTitle);
239239
}
240240

241241
}

0 commit comments

Comments
 (0)