Fix build

This commit is contained in:
Stefan Neuhaus
2016-10-09 02:59:32 +02:00
parent 51c96894b4
commit 3470d33bdc

View File

@@ -17,7 +17,6 @@
*/ */
package org.owasp.dependencycheck; package org.owasp.dependencycheck;
import com.google.common.base.Stopwatch;
import org.owasp.dependencycheck.analyzer.AnalysisPhase; import org.owasp.dependencycheck.analyzer.AnalysisPhase;
import org.owasp.dependencycheck.analyzer.Analyzer; import org.owasp.dependencycheck.analyzer.Analyzer;
import org.owasp.dependencycheck.analyzer.AnalyzerService; import org.owasp.dependencycheck.analyzer.AnalyzerService;
@@ -398,7 +397,7 @@ public class Engine implements FileFilter {
final List<Analyzer> analyzerList = analyzers.get(phase); final List<Analyzer> analyzerList = analyzers.get(phase);
for (final Analyzer a : analyzerList) { for (final Analyzer a : analyzerList) {
Stopwatch watch = Stopwatch.createStarted(); final long analyzerStart = System.currentTimeMillis();
try { try {
initializeAnalyzer(a); initializeAnalyzer(a);
} catch (InitializationException ex) { } catch (InitializationException ex) {
@@ -407,7 +406,10 @@ public class Engine implements FileFilter {
} }
executeAnalysisTasks(exceptions, a); executeAnalysisTasks(exceptions, a);
LOGGER.info("Finished {}. Took {} secs.", a.getName(), watch.elapsed(TimeUnit.SECONDS));
final long analyzerDurationMillis = System.currentTimeMillis() - analyzerStart;
final long analyzerDurationSeconds = TimeUnit.MILLISECONDS.toSeconds(analyzerDurationMillis);
LOGGER.info("Finished {}. Took {} secs.", a.getName(), analyzerDurationSeconds);
} }
} }
for (AnalysisPhase phase : AnalysisPhase.values()) { for (AnalysisPhase phase : AnalysisPhase.values()) {