From b9b4d060f190066ef2a8260646ee50319ccb7368 Mon Sep 17 00:00:00 2001 From: Conor MacNeill Date: Mon, 20 Nov 2000 06:25:20 +0000 Subject: [PATCH] Fix up problem with multiple source dirs in javac git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268215 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/taskdefs/Javac.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/Javac.java b/src/main/org/apache/tools/ant/taskdefs/Javac.java index 1fa9cff4e..4aeafed5b 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Javac.java +++ b/src/main/org/apache/tools/ant/taskdefs/Javac.java @@ -362,7 +362,14 @@ public class Javac extends MatchingTask { m.setFrom("*.java"); m.setTo("*.class"); SourceFileScanner sfs = new SourceFileScanner(this); - compileList = sfs.restrictAsFiles(files, srcDir, destDir, m); + File[] newFiles = sfs.restrictAsFiles(files, srcDir, destDir, m); + + if (newFiles.length > 0) { + File[] newCompileList = new File[compileList.length + newFiles.length]; + System.arraycopy(compileList, 0, newCompileList, 0, compileList.length); + System.arraycopy(newFiles, 0, newCompileList, compileList.length, newFiles.length); + compileList = newCompileList; + } } // XXX