isolate the analyze method to try and resolve multiple threads hitting the Lucene query parsers at the same time per issue #388

This commit is contained in:
Jeremy Long
2016-02-20 08:18:00 -05:00
parent dd440c8f9f
commit 81026e8dca

View File

@@ -481,7 +481,7 @@ public class CPEAnalyzer implements Analyzer {
* @throws AnalysisException is thrown if there is an issue analyzing the dependency.
*/
@Override
public void analyze(Dependency dependency, Engine engine) throws AnalysisException {
public synchronized void analyze(Dependency dependency, Engine engine) throws AnalysisException {
try {
determineCPE(dependency);
} catch (CorruptIndexException ex) {