Closed mir-am closed 1 year ago
The problem with this class is that it is central for the (de-) centralization of Pom
objects... I would prefer not to change it without deeper analysis of the effect of the changes on performance.
I also do not see the use case, how would you create a download URL for a version range? There is no way you can figure out all versions in between, for that, you need the resolution service, which does return a ResolvedRevision
instead...
If white spaces remain indeed an issue, this should be addressed in the extractor that "fills" the VersionConstraint.... we could simply remove all spaces (or any whitespace for that matter), they do not carry any meaning in a version.
I agree with the points above. Also, I am using RestMavenResolver
in core
to get dependencies with a resolved version. So, there seems to be no need to merge this PR.
I am going to close this PR.
Description
This is a small fix to the
getUpperBound
andgetLowerBound
methods inVersionConstraint
to trim trailing and leading whitespace.Motivation and context
Whitespace in version strings might cause issues, for example, when downloading Jars or doing comparisons.
Testing
Added a unit test.