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