DATACMNS-496 - Version.parse(…) now drops non-numeric artifacts.
Version parsing failed when given version contained non-numeric parts (like 2.0.0-rc1). We now strip everything after the first non numeric part to create a logical version equivalent of the source String. Original pull request: #81.
This commit is contained in:
committed by
Oliver Gierke
parent
ec49499e50
commit
57271baf54
@@ -53,7 +53,7 @@ public class Version implements Comparable<Version> {
|
||||
int[] intParts = new int[parts.length];
|
||||
|
||||
for (int i = 0; i < parts.length; i++) {
|
||||
intParts[i] = Integer.parseInt(parts[i]);
|
||||
intParts[i] = Integer.parseInt(parts[i].replaceAll("\\D.*", ""));
|
||||
}
|
||||
|
||||
return new Version(intParts);
|
||||
|
||||
Reference in New Issue
Block a user