semver4j
semver4j copied to clipboard
Ivy version range `[1.0,2.0]` is not satisfied by `1.0`
Using
Requirement.buildIvy("[1.0,2.0]").isSatisfiedBy(Semver("1.0", Semver.SemverType.LOOSE))
in version 3.1.0
retuns false
, but according to the ivy version-matchers specification, it should be true
.
This is caused by this check: https://github.com/vdurmont/semver4j/blob/7653e418d610ffcd2811bcb55fd72d00d420950b/src/main/java/com/vdurmont/semver4j/Range.java#L34
Where in the right-hand side of the ||
, "1.0".isEquivalentTo("1.0.0")
is checked, which then internally calls "1.0".isEqualTo("1.0.0")
.
This issue might be related to https://github.com/vdurmont/semver4j/issues/59.
@MarcelBochtler if you are still interesting, I've made copy of this lib and fix bug reported by you. Look for version 2.0.1