Conversation
Signed-off-by: Gary O'Neall <[email protected]>
Signed-off-by: Gary O'Neall <[email protected]>
Fixes #34 Also includes some minor performance improvements Sorting does degrate the performance by about 40% on the optimized code. However, it is still reasonably fast at >28,000 lines per second on my machine
Signed-off-by: Gary O'Neall <[email protected]>
Signed-off-by: Gary O'Neall <[email protected]>
| } | ||
| // Creators | ||
| Collection<String> creators = doc.getCreationInfo().getCreators(); | ||
| List<String> creators = new ArrayList<>(doc.getCreationInfo().getCreators()); |
There was a problem hiding this comment.
NULL_DEREFERENCE: object returned by doc.getCreationInfo() could be null and is dereferenced at line 183.
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
| Command | Usage |
|---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
Signed-off-by: Gary O'Neall <[email protected]>
| // first print out any described files or snippets | ||
| final List<SpdxElement> alreadyPrinted = new ArrayList<>(); | ||
| Collection<SpdxElement> items = doc.getDocumentDescribes(); | ||
| final Set<SpdxElement> alreadyPrinted = new HashSet<>(); |
There was a problem hiding this comment.
💬 2 similar findings have been found in this PR
UnnecessaryFinal: Since Java 8, it's been unnecessary to make local variables and parameters final for use in lambdas or anonymous classes. Marking them as final is weakly discouraged, as it adds a fair amount of noise for minimal benefit.
| final Set<SpdxElement> alreadyPrinted = new HashSet<>(); | |
| Set<SpdxElement> alreadyPrinted = new HashSet<>(); |
🔎 Expand here to view all instances of this finding
| File Path | Line Number |
|---|---|
| src/main/java/org/spdx/tag/CommonCode.java | 221 |
| src/main/java/org/spdx/tag/CommonCode.java | 227 |
Visit the Lift Web Console to find more details in your report.
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
| Command | Usage |
|---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
🛠 Lift Auto-fixSome of the Lift findings in this PR can be automatically fixed. You can download and apply these changes in your local project directory of your branch to review the suggestions before committing.1 # Download the patch
curl https://lift.sonatype.com/api/patch/github.com/spdx/spdx-java-tagvalue-store/35.diff -o lift-autofixes.diff
# Apply the patch with git
git apply lift-autofixes.diff
# Review the changes
git diffWant it all in a single command? Open a terminal in your project's directory and copy and paste the following command: curl https://lift.sonatype.com/api/patch/github.com/spdx/spdx-java-tagvalue-store/35.diff | git applyOnce you're satisfied commit and push your changes in your project. Footnotes |
Signed-off-by: Gary O'Neall <[email protected]>
Fixes #34
Also includes some minor performance improvements
Sorting does degrade the performance by about 40% on the optimized code. However, it is still reasonably fast at >28,000 lines per second on my machine.