From 93f679b73b8cb8647212ea25b3fb6b3f3202a614 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Tue, 18 Aug 2009 10:55:36 +0000 Subject: [PATCH] clear compilelist in rmic before execute, not afterwards - just like javac does. PR 21089 git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@805354 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/taskdefs/Rmic.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/Rmic.java b/src/main/org/apache/tools/ant/taskdefs/Rmic.java index c9b52a773..b338b9511 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Rmic.java +++ b/src/main/org/apache/tools/ant/taskdefs/Rmic.java @@ -567,6 +567,8 @@ public class Rmic extends MatchingTask { * if there's a problem with baseDir or RMIC */ public void execute() throws BuildException { + compileList.clear(); + File outputDir = getOutputDir(); if (outputDir == null) { throw new BuildException(ERROR_BASE_NOT_SET, getLocation()); @@ -589,7 +591,6 @@ public class Rmic extends MatchingTask { Path classpath = adapter.getClasspath(); loader = getProject().createClassLoader(classpath); - try { // scan base dirs to build up compile lists only if a // specific classname is not given if (classname == null) { @@ -642,9 +643,6 @@ public class Rmic extends MatchingTask { } } } - } finally { - compileList.removeAllElements(); - } } /**