* fix for NPE in version string comparison
This commit is contained in:
parent
4e602b07e9
commit
f23114f901
|
@ -465,6 +465,7 @@ public class SnapShotGenerationTests {
|
|||
fp.setHostServices(context);
|
||||
messages = new ArrayList<ValidationMessage>();
|
||||
|
||||
System.out.println("---- "+id+" -----------------------------------------");
|
||||
if (test.isFail()) {
|
||||
boolean failed = true;
|
||||
try {
|
||||
|
|
|
@ -229,8 +229,14 @@ public class VersionUtilities {
|
|||
* @return Is {@literal current} later or equal to {@literal test}? For example, if <code>this = 0.5</code> and <code>current = 0.6</code> this method will return true
|
||||
*/
|
||||
public static boolean isThisOrLater(String test, String current) {
|
||||
if (test == null || current == null) {
|
||||
return false;
|
||||
}
|
||||
String t = getMajMin(test);
|
||||
String c = getMajMin(current);
|
||||
if (t == null || c == null) {
|
||||
return false;
|
||||
}
|
||||
if (c.compareTo(t) == 0) {
|
||||
return isMajMinOrLaterPatch(test, current);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue