From 3b10bf7dbdc63d0a2424af34ee3c0d18087e6b91 Mon Sep 17 00:00:00 2001 From: liamfallon Date: Tue, 21 May 2019 11:13:17 +0000 Subject: Fix policy version compare on versions > 9 Issue-ID: POLICY-1777 Change-Id: I83d6d15653a5bd934515980186349b8bd710c113 Signed-off-by: liamfallon --- .../src/main/java/org/onap/policy/models/base/PfConceptKey.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'models-base') diff --git a/models-base/src/main/java/org/onap/policy/models/base/PfConceptKey.java b/models-base/src/main/java/org/onap/policy/models/base/PfConceptKey.java index 5d6ac13c1..9bfe8abc9 100644 --- a/models-base/src/main/java/org/onap/policy/models/base/PfConceptKey.java +++ b/models-base/src/main/java/org/onap/policy/models/base/PfConceptKey.java @@ -205,17 +205,17 @@ public class PfConceptKey extends PfKey { // There must always be at least one element in each version if (!thisVersionArray[0].equals(otherVersionArray[0])) { - return thisVersionArray[0].compareTo(otherVersionArray[0]) > 0; + return Integer.valueOf(thisVersionArray[0]) > Integer.valueOf(otherVersionArray[0]); } if (thisVersionArray.length >= 2 && otherVersionArray.length >= 2 && !thisVersionArray[1].equals(otherVersionArray[1])) { - return thisVersionArray[1].compareTo(otherVersionArray[1]) > 0; + return Integer.valueOf(thisVersionArray[1]) > Integer.valueOf(otherVersionArray[1]); } if (thisVersionArray.length >= 3 && otherVersionArray.length >= 3 && !thisVersionArray[2].equals(otherVersionArray[2])) { - return thisVersionArray[2].compareTo(otherVersionArray[2]) > 0; + return Integer.valueOf(thisVersionArray[2]) > Integer.valueOf(otherVersionArray[2]); } return false; -- cgit 1.2.3-korg