We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e40c81 commit 9b7e169Copy full SHA for 9b7e169
1 file changed
src/main/java/org/scijava/util/MiscUtils.java
@@ -91,9 +91,7 @@ public static <T extends Comparable<? super T>> int compare(final T o1,
91
* {@code o1.equals(o2)} holds.
92
*/
93
public static boolean equal(final Object o1, final Object o2) {
94
- if (o1 == null && o2 == null) return true;
95
- if (o1 == null || o2 == null) return false;
96
- return o1.equals(o2);
+ return o1 == null ? o2 == null : o1.equals(o2);
97
}
98
99
0 commit comments