bodewig 00/07/14 08:09:24
Modified: src/main/org/apache/tools/ant/taskdefs Javac.java
Log:
Have getCompileClasspath return Path instead of String.
Revision Changes Path
1.24 +8 -10
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.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- Javac.java 2000/07/14 14:35:44 1.23
+++ Javac.java 2000/07/14 15:09:21 1.24
@@ -380,14 +380,12 @@
* @param addRuntime Shall <code>rt.jar</code> or
* <code>classes.zip</code> be added to the classpath.
*/
- private String getCompileClasspath(boolean addRuntime) {
+ private Path getCompileClasspath(boolean addRuntime) {
Path classpath = new Path();
// add dest dir to classpath so that previously compiled and
// untouched classes are on classpath
- //classpath.append(sourceDir.getAbsolutePath());
- //classpath.append(File.pathSeparator);
classpath.setLocation(destDir.getAbsolutePath());
// add our classpath to the mix
@@ -422,13 +420,13 @@
}
}
- return classpath.toString();
+ return classpath;
}
/**
- * Takes a classpath-like string, and adds each element of
- * this string to a new classpath, if the components exist.
+ * Takes a Path, and adds each element of
+ * another Path to a new classpath, if the components exist.
* Components that don't exist, aren't added.
* We do this, because jikes issues warnings for non-existant
* files/dirs in his classpath, and these warnings are pretty
@@ -458,7 +456,7 @@
private void doClassicCompile() throws BuildException {
log("Using classic compiler", Project.MSG_VERBOSE);
- String classpath = getCompileClasspath(false);
+ Path classpath = getCompileClasspath(false);
Vector argList = new Vector();
if (deprecation == true)
@@ -546,7 +544,7 @@
}
log("Using modern compiler", Project.MSG_VERBOSE);
- String classpath = getCompileClasspath(false);
+ Path classpath = getCompileClasspath(false);
Vector argList = new Vector();
if (deprecation == true)
@@ -650,7 +648,7 @@
classpath.append(bootclasspath);
}
- classpath.append(new Path(getCompileClasspath(true)));
+ classpath.append(getCompileClasspath(true));
// Jikes doesn't support an extension dir (-extdir)
// so we'll emulate it for compatibility and convenience.
@@ -774,7 +772,7 @@
* This method adds all jar archives in the given
* directories (but not in sub-directories!) to the classpath,
* so that you don't have to specify them all one by one.
- * @param classpath - stringbuffer to append jar files to
+ * @param classpath - Path to append jar files to
*/
private void addExtdirsToClasspath(Path classpath) {
// FIXME