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
@@ -123,4 +123,12 @@ public class VersionUnitTests {
|
||||
assertThat(new Version(2, 0, 1, 0).toString(), is("2.0.1"));
|
||||
assertThat(new Version(2, 0, 0, 1).toString(), is("2.0.0.1"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-496
|
||||
*/
|
||||
@Test
|
||||
public void parseShouldRemoveNonNumericVersionParts() {
|
||||
assertThat(Version.parse("2.0.0-rc1"), is(new Version(2, 0, 0)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user