dependency-check-core/src/main/java/org/owasp/dependencycheck/Engine.java
/**
     * Executes executes the analyzer using multiple threads.
     *
     * @param exceptions a collection of exceptions that occurred during
     * analysis
     * @param analyzer the analyzer to execute
     * @throws ExceptionCollection thrown if exceptions occurred during analysis
     */
Executes executes the analyzer using multiple threads.
@param exceptions a collection of exceptions that occurred during
analysis
@param analyzer the analyzer to execute
@throws ExceptionCollection thrown if exceptions occurred during analysis
Executes executes the analyzer using multiple threads . @param exceptions a collection of exceptions that occurred during analysis @param analyzer the analyzer to execute @throws ExceptionCollection thrown if exceptions occurred during analysis
protected void executeAnalysisTasks(Analyzer analyzer, List<Throwable> exceptions) throws ExceptionCollection {
        LOGGER.debug("Starting {}", analyzer.getName());
        final List<AnalysisTask> analysisTasks = getAnalysisTasks(analyzer, exceptions);
        final ExecutorService executorService = getExecutorService(analyzer);
        try {
            final List<Future<Void>> results = executorService.invokeAll(analysisTasks, 10, TimeUnit.MINUTES);
            for (Future<Void> result : results) {
                try {
                    result.get();
                } catch (ExecutionException e) {
                    throwFatalExceptionCollection("Analysis task failed with a fatal exception.", e, exceptions);
                } catch (CancellationException e) {
                    throwFatalExceptionCollection("Analysis task timed out.", e, exceptions);
                }
            }
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
            throwFatalExceptionCollection("Analysis has been interrupted.", e, exceptions);
        } finally {
            executorService.shutdown();
        }
    }
protected void executeAnalysisTasks ( Analyzer analyzer , List < Throwable > exceptions ) throws ExceptionCollection { LOGGER . debug ( "Starting {}" , analyzer . getName ( ) ) ; final List < AnalysisTask > analysisTasks = getAnalysisTasks ( analyzer , exceptions ) ; final ExecutorService executorService = getExecutorService ( analyzer ) ; try { final List < Future < Void > > results = executorService . invokeAll ( analysisTasks , 10 , TimeUnit . MINUTES ) ; for ( Future < Void > result : results ) { try { result . get ( ) ; } catch ( ExecutionException e ) { throwFatalExceptionCollection ( "Analysis task failed with a fatal exception." , e , exceptions ) ; } catch ( CancellationException e ) { throwFatalExceptionCollection ( "Analysis task timed out." , e , exceptions ) ; } } } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; throwFatalExceptionCollection ( "Analysis has been interrupted." , e , exceptions ) ; } finally { executorService . shutdown ( ) ; } }
Executes executes the analyzer using multiple threads.
Executes executes the analyzer using multiple threads .
// ensure there was no exception during execution