removed synchronization

This commit is contained in:
Jeremy Long
2017-09-04 08:52:45 -04:00
parent a967735e11
commit 31fb9b0a20

View File

@@ -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 <code>true</code> 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) {