Support testing null against null in equalsHelper()
[yangtools.git] / common / util / src / main / java / org / opendaylight / yangtools / util / EvenMoreObjects.java
index c7988c1bf8950d015024db895a8765113ad647aa..137ff43e78aee6bf0951e463f82648454d853803 100644 (file)
@@ -34,12 +34,12 @@ public final class EvenMoreObjects {
 
     @SuppressWarnings("unchecked")
     public static <T> boolean equalsHelper(T self, Object other, BooleanEqualsFunction<T> equals) {
-        if (other == null) {
-            return false;
-        }
         if (other == self) {
             return true;
         }
+        if (other == null) {
+            return false;
+        }
         if (self.getClass() != other.getClass()) {
             return false;
         }