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