Updated to accomadate removing dependencies (used by the DependencyBundlingAnalyzer)

Former-commit-id: 3719925f410094d04d5276e118c48f6733d15a17
This commit is contained in:
Jeremy Long
2013-04-19 18:45:40 -04:00
parent 1b021a2eec
commit 811f85c127

View File

@@ -209,10 +209,16 @@ public class Engine {
final List<Analyzer> analyzerList = analyzers.get(phase);
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())) {
try {
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) {
d.addAnalysisException(ex);
}