replace hashCode function with compareTo
[policy/models.git] / models-base / src / main / java / org / onap / policy / models / base / PfKeyUse.java
index 836707e..d56b0db 100644 (file)
@@ -152,7 +152,7 @@ public class PfKeyUse extends PfKey {
             return 0;
         }
         if (getClass() != otherObj.getClass()) {
-            return this.hashCode() - otherObj.hashCode();
+            return getClass().getName().compareTo(otherObj.getClass().getName());
         }
 
         final PfKeyUse other = (PfKeyUse) otherObj;