-
Type:
Bug
-
Status: Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 3.6.3
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
When a hard version requirement (Ex - [1.0]) is passed to VersionRange#createFromVersionSpec(String), it is parsed to [1.0, 1.0]. But, this version range is invalid according to this exception. If the parsed version range ([1.0, 1.0]) is converted to a String, it cannot be parsed once again by VersionRange#createFromVersionSpec(String).
Steps to reproduce -
VersionRange versionRange = VersionRange.createFromVersionSpec("[1.0]"); // [1.0, 1.0] String stringVersionRange = VersionRange.toString(versionRange); // "[1.0, 1.0]" VersionRange exceptionVersionRange = VersionRange.createFromVersionSpec(stringVersionRange); // <- InvalidVersionSpecificationException( "Range cannot have identical boundaries: [1.0, 1.0]" )