"!=" operator is used to compare two BigInteger-s instead of BigInteger#equails() at [1].
Fixing the issue made unit tests fail. So the unit tests need to be updated.
DottedVersion implements Comparable<String> interface. That is wrong, it should be Comparable<DottedVersion>.
If it implements Comparable, it should also override Object#equals. DottedVersion has "greedy" field that makes implementation of DottedVersion#equals ambiguous.
DottedVersion doesn't allow capturing unrecognizable remainder of the version string. This will be handy when parsing WiX4 version string which is "4.0.5+b9b2f1b4"
A lot of issues with the class implementation and supported functionality.
[1] https://github.com/openjdk/jdk/blob/ec88c6a872a97cee1cde8844f5ee6834023a10c6/src/jdk.jpackage/share/classes/jdk/jpackage/internal/DottedVersion.java#L137
Fixing the issue made unit tests fail. So the unit tests need to be updated.
DottedVersion implements Comparable<String> interface. That is wrong, it should be Comparable<DottedVersion>.
If it implements Comparable, it should also override Object#equals. DottedVersion has "greedy" field that makes implementation of DottedVersion#equals ambiguous.
DottedVersion doesn't allow capturing unrecognizable remainder of the version string. This will be handy when parsing WiX4 version string which is "4.0.5+b9b2f1b4"
A lot of issues with the class implementation and supported functionality.
[1] https://github.com/openjdk/jdk/blob/ec88c6a872a97cee1cde8844f5ee6834023a10c6/src/jdk.jpackage/share/classes/jdk/jpackage/internal/DottedVersion.java#L137