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 * @throws DatabaseException when the database throws an exception. This
* usually occurs when the database is in use by another process. * usually occurs when the database is in use by another process.
*/ */
public synchronized void open(CveDB cve) throws IOException, DatabaseException { public void open(CveDB cve) throws IOException, DatabaseException {
if (!isOpen()) {
this.cve = cve; this.cve = cve;
this.cpe = CpeMemoryIndex.getInstance(); this.cpe = CpeMemoryIndex.getInstance();
try { try {
@@ -170,7 +169,6 @@ public class CPEAnalyzer extends AbstractAnalyzer {
throw new DatabaseException(ex); throw new DatabaseException(ex);
} }
} }
}
/** /**
* Closes the data sources. * Closes the data sources.
@@ -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 * Searches the data store of CPE entries, trying to identify the CPE for
* the given dependency based on the evidence contained within. The * the given dependency based on the evidence contained within. The
@@ -524,7 +513,7 @@ public class CPEAnalyzer extends AbstractAnalyzer {
* dependency. * dependency.
*/ */
@Override @Override
protected synchronized void analyzeDependency(Dependency dependency, Engine engine) throws AnalysisException { protected void analyzeDependency(Dependency dependency, Engine engine) throws AnalysisException {
try { try {
determineCPE(dependency); determineCPE(dependency);
} catch (CorruptIndexException ex) { } catch (CorruptIndexException ex) {