replace hashCode function with compareTo
[policy/models.git] / models-tosca / src / main / java / org / onap / policy / models / tosca / simple / concepts / JpaToscaConstraintValidValues.java
index 248ca49..2a12157 100644 (file)
@@ -92,7 +92,7 @@ public class JpaToscaConstraintValidValues extends JpaToscaConstraint {
             return 0;
         }
         if (getClass() != otherConstraint.getClass()) {
-            return this.hashCode() - otherConstraint.hashCode();
+            return getClass().getName().compareTo(otherConstraint.getClass().getName());
         }
 
         final JpaToscaConstraintValidValues other = (JpaToscaConstraintValidValues) otherConstraint;