more options for validation version comparison

This commit is contained in:
Grahame Grieve 2020-08-17 20:24:52 +10:00
parent 99466e9fe3
commit 53dbf4fd4b
1 changed files with 15 additions and 6 deletions

View File

@ -147,13 +147,22 @@ public class VersionUtilities {
} }
public static boolean versionsCompatible(String v1, String v2) { public static boolean versionsCompatible(String v1, String v2) {
String mm1 = getMajMin(v1); String[] v1l = v1.split("\\|");
String mm2 = getMajMin(v2); String[] v2l = v2.split("\\|");
if (mm1 == null || mm2 == null) { for (String vs1 : v1l) {
return false; for (String vs2 : v2l) {
} else { String mm1 = getMajMin(vs1);
return mm1.equals(mm2); String mm2 = getMajMin(vs2);
if (mm1 == null || mm2 == null) {
return false;
} else {
if (mm1.equals(mm2)) {
return true;
}
}
}
} }
return false;
} }
public static boolean isCorePackage(String s) { public static boolean isCorePackage(String s) {