chore: use correct method for finding missing versions of java PURLs #1156
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.
Summary
This PR fixes an issue with the Java Repo Finder caused by the remnants of a bad merge.
Description of changes
The Java Repo Finder was failing to find the repository of the PURL
pkg:maven/io.vertx/vertx-auth-common, thereby causing the related integration test to fail. The trigger for this outcome was an issue with thedeps.devresults for the latest version of thevertx-auth-commonartefact, v5.0.3. However, the Java Repo Finder should not have been relying on this API call to report the correct repository. Previously, Java artefacts required a PURL to have a version as the method of repository finding involves a direct retrieval of the related POM. This was later changed so thatdeps.devwould be used in these cases to find the version before the POM retrieval occurred but it seems that this change may not have been correctly merged, as the Java Repo Finder contained two version checking blocks in quick succession, the first of which would preventdeps.devbeing used only for finding the version (the second block), and instead leading todeps.devbeing used as part of the fallback option, meaning version and repository finding. This went unnoticed as this behaviour typically produces the same results. It was only due to the error with the latest version of the above artefact that this caused a discrepancy.This PR fixes the Java Repo Finder to correctly seek missing versions. It also changes the related integration test: disabling the fallback option so that the correct behaviour is confirmed by the test passing.