mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-18 07:14:09 +01:00
Updated to accomadate removing dependencies (used by the DependencyBundlingAnalyzer)
Former-commit-id: 3719925f410094d04d5276e118c48f6733d15a17
This commit is contained in:
@@ -209,10 +209,16 @@ public class Engine {
|
|||||||
final List<Analyzer> analyzerList = analyzers.get(phase);
|
final List<Analyzer> analyzerList = analyzers.get(phase);
|
||||||
|
|
||||||
for (Analyzer a : analyzerList) {
|
for (Analyzer a : analyzerList) {
|
||||||
for (Dependency d : dependencies) {
|
Iterator<Dependency> itrDependencies = dependencies.iterator();
|
||||||
|
while (itrDependencies.hasNext()) {
|
||||||
|
Dependency d = itrDependencies.next();
|
||||||
if (a.supportsExtension(d.getFileExtension())) {
|
if (a.supportsExtension(d.getFileExtension())) {
|
||||||
try {
|
try {
|
||||||
a.analyze(d, this);
|
a.analyze(d, this);
|
||||||
|
//the following is mainly to deal with the DependencyBundlingAnalyzer
|
||||||
|
if (a.getPostAnalysisAction() == Analyzer.PostAnalysisAction.REMOVE_JAR) {
|
||||||
|
itrDependencies.remove();
|
||||||
|
}
|
||||||
} catch (AnalysisException ex) {
|
} catch (AnalysisException ex) {
|
||||||
d.addAnalysisException(ex);
|
d.addAnalysisException(ex);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user