From 31fb9b0a206e2a111b93594612112497200057fc Mon Sep 17 00:00:00 2001 From: Jeremy Long Date: Mon, 4 Sep 2017 08:52:45 -0400 Subject: [PATCH] removed synchronization --- .../dependencycheck/analyzer/CPEAnalyzer.java | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/CPEAnalyzer.java b/dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/CPEAnalyzer.java index 4b392173d..73179254d 100644 --- a/dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/CPEAnalyzer.java +++ b/dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/CPEAnalyzer.java @@ -156,8 +156,7 @@ public class CPEAnalyzer extends AbstractAnalyzer { * @throws DatabaseException when the database throws an exception. This * usually occurs when the database is in use by another process. */ - public synchronized void open(CveDB cve) throws IOException, DatabaseException { - if (!isOpen()) { + public void open(CveDB cve) throws IOException, DatabaseException { this.cve = cve; this.cpe = CpeMemoryIndex.getInstance(); try { @@ -169,7 +168,6 @@ public class CPEAnalyzer extends AbstractAnalyzer { LOGGER.debug("IndexException", ex); throw new DatabaseException(ex); } - } } /** @@ -183,15 +181,6 @@ public class CPEAnalyzer extends AbstractAnalyzer { } } - /** - * Returns whether or not the analyzer is open. - * - * @return true if the analyzer is open - */ - public boolean isOpen() { - return cpe != null && cpe.isOpen(); - } - /** * Searches the data store of CPE entries, trying to identify the CPE for * the given dependency based on the evidence contained within. The @@ -524,7 +513,7 @@ public class CPEAnalyzer extends AbstractAnalyzer { * dependency. */ @Override - protected synchronized void analyzeDependency(Dependency dependency, Engine engine) throws AnalysisException { + protected void analyzeDependency(Dependency dependency, Engine engine) throws AnalysisException { try { determineCPE(dependency); } catch (CorruptIndexException ex) {