From b7909b8e74c0bc5920f5d0397a4371988df9e8b2 Mon Sep 17 00:00:00 2001 From: "Henry.Sun" Date: Wed, 7 Aug 2019 03:41:50 +0000 Subject: replace hashCode function with compareTo Issue-ID: POLICY-1600 Change-Id: If660cbe84424e492b6db3ab11ef97b37f046b3aa Signed-off-by: Henry.Sun --- .../java/org/onap/policy/models/pdp/persistence/concepts/JpaPdp.java | 2 +- .../org/onap/policy/models/pdp/persistence/concepts/JpaPdpSubGroup.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'models-pdp/src/main/java') diff --git a/models-pdp/src/main/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdp.java b/models-pdp/src/main/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdp.java index 528d6fbe7..7d90c03b1 100644 --- a/models-pdp/src/main/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdp.java +++ b/models-pdp/src/main/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdp.java @@ -210,7 +210,7 @@ public class JpaPdp extends PfConcept implements PfAuthorative, Serializabl return 0; } if (getClass() != otherConcept.getClass()) { - return this.hashCode() - otherConcept.hashCode(); + return getClass().getName().compareTo(otherConcept.getClass().getName()); } final JpaPdp other = (JpaPdp) otherConcept; diff --git a/models-pdp/src/main/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpSubGroup.java b/models-pdp/src/main/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpSubGroup.java index f0ff4a6c2..723d427de 100644 --- a/models-pdp/src/main/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpSubGroup.java +++ b/models-pdp/src/main/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpSubGroup.java @@ -360,7 +360,7 @@ public class JpaPdpSubGroup extends PfConcept implements PfAuthorative