bodewig 01/02/15 04:59:32
Modified: . Tag: ANT_13_BRANCH build.xml
src/main/org/apache/tools/ant/types Tag: ANT_13_BRANCH
CommandlineJava.java
Log:
Make sure -classpath will only be set if the classpath is not empty.
Submitted by: Jesse Glick <[EMAIL PROTECTED]>
reenable test for CommandLineJava.
Revision Changes Path
No revision
No revision
1.130.2.5 +0 -3 jakarta-ant/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-ant/build.xml,v
retrieving revision 1.130.2.4
retrieving revision 1.130.2.5
diff -u -r1.130.2.4 -r1.130.2.5
--- build.xml 2001/02/14 14:14:03 1.130.2.4
+++ build.xml 2001/02/15 12:59:31 1.130.2.5
@@ -559,9 +559,6 @@
<exclude name="org/apache/tools/ant/taskdefs/TaskdefsTest.java" />
<exclude
name="org/apache/tools/ant/util/regexp/RegexpMatcherTest.java" />
- <!-- currently fails - will be sorted out soon -->
- <exclude
name="org/apache/tools/ant/types/CommandlineJavaTest.java" />
-
<!-- these depend on order -->
<exclude name="org/apache/tools/ant/taskdefs/GUnzipTest.java" />
<exclude name="org/apache/tools/ant/taskdefs/GzipTest.java" />
No revision
No revision
1.9.2.2 +4 -3
jakarta-ant/src/main/org/apache/tools/ant/types/CommandlineJava.java
Index: CommandlineJava.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/CommandlineJava.java,v
retrieving revision 1.9.2.1
retrieving revision 1.9.2.2
diff -u -r1.9.2.1 -r1.9.2.2
--- CommandlineJava.java 2001/02/08 00:53:54 1.9.2.1
+++ CommandlineJava.java 2001/02/15 12:59:32 1.9.2.2
@@ -172,9 +172,10 @@
}
public String[] getCommandline() {
+ Path fullClasspath = classpath != null ?
classpath.concatSystemClasspath("ignore") : null;
int size =
vmCommand.size() + javaCommand.size() + sysProperties.size();
- if (classpath != null && classpath.size() > 0) {
+ if (fullClasspath != null && fullClasspath.size() > 0) {
size += 2;
}
@@ -188,9 +189,9 @@
result, pos, sysProperties.size());
pos += sysProperties.size();
}
- if (classpath != null && classpath.size() > 0) {
+ if (fullClasspath != null && fullClasspath.size() > 0) {
result[pos++] = "-classpath";
- result[pos++] =
classpath.concatSystemClasspath("ignore").toString();
+ result[pos++] = fullClasspath.toString();
}
System.arraycopy(javaCommand.getCommandline(), 0,
result, pos, javaCommand.size());