Fix Decimal64.equals() 03/85303/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 10 Oct 2019 10:29:23 +0000 (12:29 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 21 Oct 2019 17:56:16 +0000 (19:56 +0200)
There is a typo here, which would end up not comparing objects
properly.

Change-Id: I5cfe31887b109bbe7be6e564078f250ea6b61747
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 3670f3b1080d917bd1bec4611e75a9b345b06023)
(cherry picked from commit faac1484eb8364c4fe52e19c2e1f473c0ce51614)

yang/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/Decimal64.java

index e1039be4cfbe193c46d841ce08bb66f16cfe8fda..216409a673e985cf8e63e97e4dbe77a76fe8a82b 100644 (file)
@@ -372,7 +372,7 @@ public class Decimal64 extends Number implements CanonicalValue<Decimal64> {
         }
 
         // We need to normalize both
-        return intPart() == other.intPart() && fracPart() == fracPart();
+        return intPart() == other.intPart() && fracPart() == other.fracPart();
     }
 
     @Override