continued work on threading and code improvement

This commit is contained in:
Jeremy Long
2017-09-03 09:05:55 -04:00
parent 795de6f9ea
commit ab5de24518
158 changed files with 1266 additions and 964 deletions

View File

@@ -20,6 +20,7 @@ package org.owasp.dependencycheck.taskdefs;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.concurrent.NotThreadSafe;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
@@ -46,6 +47,7 @@ import org.slf4j.impl.StaticLoggerBinder;
*
* @author Jeremy Long
*/
@NotThreadSafe
public class Check extends Update {
/**
@@ -161,6 +163,7 @@ public class Check extends Update {
/**
* Suppression file paths.
*/
@SuppressWarnings("CanBeFinal")
private List<String> suppressionFiles = new ArrayList<>();
/**
@@ -1065,7 +1068,7 @@ public class Check extends Update {
* @throws BuildException thrown if a CVSS score is found that is higher
* than the threshold set
*/
private void checkForFailure(List<Dependency> dependencies) throws BuildException {
private void checkForFailure(Dependency[] dependencies) throws BuildException {
final StringBuilder ids = new StringBuilder();
for (Dependency d : dependencies) {
for (Vulnerability v : d.getVulnerabilities()) {
@@ -1092,7 +1095,7 @@ public class Check extends Update {
*
* @param dependencies a list of dependency objects
*/
private void showSummary(List<Dependency> dependencies) {
private void showSummary(Dependency[] dependencies) {
final StringBuilder summary = new StringBuilder();
for (Dependency d : dependencies) {
boolean firstEntry = true;

View File

@@ -48,7 +48,7 @@ public class StaticLoggerBinder implements LoggerFactoryBinder {
*
* @return the StaticLoggerBinder singleton
*/
public static final StaticLoggerBinder getSingleton() {
public static StaticLoggerBinder getSingleton() {
return SINGLETON;
}