-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ConcurrentModificationException #3561
Conversation
core/src/main/java/org/owasp/dependencycheck/dependency/Dependency.java
Outdated
Show resolved
Hide resolved
Same fix is needed for DependencyMergingAnalyzer at lines 147-149. |
Sorry... overlooked that file in the changelog... It's already in there. So that leaves only FalsePostiveAnalyzer.removeBadMatches which removes items from vulnerableSoftwareIdentifiers while while iterating over them
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These look good to me, and also get rid of a potentially dangerous state-modifying peek that was signalled by SonarLint.
When a FalsePositiveAnalyzer#removeBadMatches fix gets added as far as I can see no further ConcurrentModifcationExceptions should happen (all other uses of the Set-getters appear to be read-only usage, already employ a defensive copy or imlement a 'gather' phase followed by an 'update' phase in the code)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
core/src/main/java/org/owasp/dependencycheck/analyzer/FalsePositiveAnalyzer.java
Outdated
Show resolved
Hide resolved
…itiveAnalyzer.java
Initial fix for ConcurrentModificationException introduced by #3466.