Use pattern matching on instanceof in yang-common
[yangtools.git] / common / yang-common / src / main / java / org / opendaylight / yangtools / yang / common / Uint64.java
index b2e2e4b0cf9e545b75f421d259d70d6970f5283a..68aaf80d7c178e7b3f164eefc12865e6744a853e 100644 (file)
@@ -439,7 +439,7 @@ public class Uint64 extends Number implements CanonicalValue<Uint64> {
 
     @Override
     public final boolean equals(final @Nullable Object obj) {
-        return this == obj || obj instanceof Uint64 && value == ((Uint64)obj).value;
+        return this == obj || obj instanceof Uint64 other && value == other.value;
     }
 
     /**