Fixes #1295: getAllUpdates(boolean) should respect currentVersionRange#1297
Merged
Conversation
19a34c0 to
850c8bb
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a bug where getAllUpdates(boolean) does not properly filter versions based on the current version range when no current version is set. The fix ensures that when an artifact has a version range but no specific current version, the method correctly excludes versions within the current range and only returns versions higher than the upper bound.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| AbstractVersionDetails.java | Adds filtering logic to exclude versions within the current version range when no current version is set |
| ArtifactVersionsTest.java | Adds parameterized test to verify that getAllUpdates correctly respects version range constraints |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
slachiewicz
approved these changes
Oct 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes this small bug.
It's currently used in DisplayDependencyUpdates, but the bug does not affect performance of the plugin whatsoever: DisplayDependencyUpdates filters all versions once again after retrieving all updates.
@slawekjaranowski because of that, I thought of maybe making all plugins just use the Resolver, or a thin wrapper on it, to retrieve all versions, and then use
ArtifactVersionsto filter them once they are retrieved. That will make it much more clear. Currently, there's so many of differentgetDependencyUpdatesvariants inVersionsHelper, which just make the whole architecture messy. That in a different PR.