Merged
Conversation
Author
|
I still need to add tests, but this is working |
chrisfesler
reviewed
Mar 16, 2024
| } | ||
| deps = installFile.getArtifacts().entrySet().stream().map(entry -> new MavenDependency() { | ||
| @Override | ||
| public String getCoord() { |
There was a problem hiding this comment.
Introducing HasCoord is a pretty sweet solution.
chrisfesler
reviewed
Mar 16, 2024
| if (v2Version.isMissingNode() && v010Version.isMissingNode()) { | ||
| LOGGER.warn("No pinned maven_install.json version found. Cannot Parse"); | ||
| return; | ||
| } else if (!v2Version.isMissingNode()) { |
There was a problem hiding this comment.
🧠 ⚡ The double negative of !v.isMissingNode() is slightly tricky to read. What about isTextual()?
Or you could do:
if (!root.has("version") && !root.path("dependency_tree").has("version")) {
// warn & return
} else if (root.has("version") {
// etc
Not sure it's better -- but maybe.
chrisfesler
reviewed
Mar 16, 2024
| */ | ||
| public String getVersion() { | ||
| return version; | ||
| } |
There was a problem hiding this comment.
You could implement HasCoord here instead of doing so anonymously up above. Maybe a little more obvious.
- Implement v2 schema support for `maven_install.json`. - Maintains backwards compatibility with v0.1.0
573c362 to
d9ba0da
Compare
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 Issue
jeremylong/DependencyCheck#6527
Description of Change
maven_install.json.Have test cases been added to cover the new functionality?
yes
Added a v2 testfile from Bazel's mainline root directory. It is large (but smaller than the ones in the repos I am currently working with), I would rather not manually construct a smaller one but can if there is a strong preference.