bodewig 00/09/15 00:10:59
Modified: src/main/org/apache/tools/ant/taskdefs Javac.java
Log:
When using the temporary file to hold the source file names (in jikes
compilation on Windows) Ant included the command itself as well as all
arguments as source files.
PR: #74 (linked to bug #31)
Submitted by: Nico Seessle <[EMAIL PROTECTED]>
Revision Changes Path
1.39 +2 -1
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java
Index: Javac.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- Javac.java 2000/09/06 14:04:58 1.38
+++ Javac.java 2000/09/15 07:10:58 1.39
@@ -667,6 +667,7 @@
/**
* Do the compile with the specified arguments.
* @param args - arguments to pass to process on command line
+ * @param firstFileName - index of the first source file in args
*/
private int executeJikesCompile(String[] args, int firstFileName) {
String[] commandArray = null;
@@ -686,7 +687,7 @@
try {
tmpFile = new File("jikes"+(new
Random(System.currentTimeMillis())).nextLong());
out = new PrintWriter(new FileWriter(tmpFile));
- for (int i = 0; i < args.length; i++) {
+ for (int i = firstFileName; i < args.length; i++) {
out.println(args[i]);
}
out.flush();