Versions may have more then 4 parts.

See #97
This commit is contained in:
Jens Schauder
2024-09-17 13:03:31 +02:00
committed by Mark Paluch
parent d1b0174f72
commit b6455f84b5

View File

@@ -29,7 +29,7 @@ public class Version implements Comparable<Version> {
private Version(BigDecimal... parts) {
Assert.notNull(parts, "Parts must not be null!");
Assert.isTrue(parts.length > 0 && parts.length < 5, "We need at least 1 at most 4 parts!");
Assert.isTrue(parts.length > 0, "We need at least 1 part!");
this.major = parts[0];
this.minor = parts.length > 1 ? parts[1] : BigDecimal.ZERO;