Open
Description
Just recording a few quirks / opportunities in MavenDependency
's findNewerVersions
method:
- Overall, this method checks Maven metadata first and then compares version numbers after; it could probably save some HTTP traffic if it first checked whether the
VersionComparator
is even able to yield a "newer version" compared to thecurrentVersion
and early-exited if not- Imagine a new
canUpgrade(String currentVersion)
method onVersionComparator
which would (eg) returnfalse
if the current version is3.0.0
and the version comparator is based on2.1.x
- Imagine a new
- Looking at the
ExactVersion
edge case which handles incomplete Maven metadata: I think this line is an obscure error, and it should be comparing if the exact version is an upgrade of the current version instead of returning it unconditionally: https://github.com/openrewrite/rewrite/blame/05795eb525099812887796b5d0a73eda6d7f6673/rewrite-maven/src/main/java/org/openrewrite/maven/trait/MavenDependency.java#L103
Metadata
Assignees
Labels
Type
Projects
Status
No status
Activity