mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-28 11:52:15 +01:00
Rather than create a collection, then call addAll to populate, the collection can be created with the collection to clone.
This commit is contained in:
@@ -366,8 +366,7 @@ public class Engine implements FileFilter {
|
|||||||
* This is okay for adds/deletes because it happens per analyzer.
|
* This is okay for adds/deletes because it happens per analyzer.
|
||||||
*/
|
*/
|
||||||
LOGGER.debug("Begin Analyzer '{}'", a.getName());
|
LOGGER.debug("Begin Analyzer '{}'", a.getName());
|
||||||
final Set<Dependency> dependencySet = new HashSet<Dependency>();
|
final Set<Dependency> dependencySet = new HashSet<Dependency>(dependencies);
|
||||||
dependencySet.addAll(dependencies);
|
|
||||||
for (Dependency d : dependencySet) {
|
for (Dependency d : dependencySet) {
|
||||||
boolean shouldAnalyze = true;
|
boolean shouldAnalyze = true;
|
||||||
if (a instanceof FileTypeAnalyzer) {
|
if (a instanceof FileTypeAnalyzer) {
|
||||||
|
|||||||
@@ -154,8 +154,7 @@ public class FalsePositiveAnalyzer extends AbstractAnalyzer {
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("null")
|
@SuppressWarnings("null")
|
||||||
private void removeSpuriousCPE(Dependency dependency) {
|
private void removeSpuriousCPE(Dependency dependency) {
|
||||||
final List<Identifier> ids = new ArrayList<Identifier>();
|
final List<Identifier> ids = new ArrayList<Identifier>(dependency.getIdentifiers());
|
||||||
ids.addAll(dependency.getIdentifiers());
|
|
||||||
Collections.sort(ids);
|
Collections.sort(ids);
|
||||||
final ListIterator<Identifier> mainItr = ids.listIterator();
|
final ListIterator<Identifier> mainItr = ids.listIterator();
|
||||||
while (mainItr.hasNext()) {
|
while (mainItr.hasNext()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user