* 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);
|
fp.setHostServices(context);
|
||||||
messages = new ArrayList<ValidationMessage>();
|
messages = new ArrayList<ValidationMessage>();
|
||||||
|
|
||||||
|
System.out.println("---- "+id+" -----------------------------------------");
|
||||||
if (test.isFail()) {
|
if (test.isFail()) {
|
||||||
boolean failed = true;
|
boolean failed = true;
|
||||||
try {
|
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
|
* @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) {
|
public static boolean isThisOrLater(String test, String current) {
|
||||||
|
if (test == null || current == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
String t = getMajMin(test);
|
String t = getMajMin(test);
|
||||||
String c = getMajMin(current);
|
String c = getMajMin(current);
|
||||||
|
if (t == null || c == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (c.compareTo(t) == 0) {
|
if (c.compareTo(t) == 0) {
|
||||||
return isMajMinOrLaterPatch(test, current);
|
return isMajMinOrLaterPatch(test, current);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue