summaryrefslogtreecommitdiff
path: root/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java
diff options
context:
space:
mode:
authorPeter Donald <donaldp@apache.org>2002-07-23 07:54:56 +0000
committerPeter Donald <donaldp@apache.org>2002-07-23 07:54:56 +0000
commit28b68ab7d0689dbc35dbdf26d2308786549b8985 (patch)
tree7a93c40b9ba9e4c1af89c02d0ffde464e7ee6454 /src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java
parent764ef4fd852696fd3e620583affdd3b439af4d14 (diff)
downloadant-28b68ab7d0689dbc35dbdf26d2308786549b8985.tar.gz
Encapsulate usage of project object rather than allowing objects 7 subclasses acessing a protected variable of their super super super .... class.
Deprecated the variable so that that anyone directly referencing variable will get warning and suggestion to use the accessor. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273155 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java')
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java
index be898ac3c..b3cdfc460 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java
@@ -143,16 +143,14 @@ public class WLJspc extends MatchingTask {
}
- String systemClassPath = System.getProperty("java.class.path");
-
- pathToPackage
+ pathToPackage
= this.destinationPackage.replace('.', File.separatorChar);
// get all the files in the sourceDirectory
DirectoryScanner ds = super.getDirectoryScanner(sourceDirectory);
//use the systemclasspath as well, to include the ant jar
if (compileClasspath == null) {
- compileClasspath = new Path(project);
+ compileClasspath = new Path(getProject());
}
compileClasspath.append(Path.systemClasspath);
@@ -162,7 +160,7 @@ public class WLJspc extends MatchingTask {
// Therefore, takes loads of time
// Can pass directories at a time (*.jsp) but easily runs out of memory on hefty dirs
// (even on a Sun)
- Java helperTask = (Java) project.createTask("java");
+ Java helperTask = (Java) getProject().createTask("java");
helperTask.setFork(true);
helperTask.setClassname("weblogic.jspc");
helperTask.setTaskName(getTaskName());
@@ -245,7 +243,7 @@ public class WLJspc extends MatchingTask {
*/
public Path createClasspath() {
if (compileClasspath == null) {
- compileClasspath = new Path(project);
+ compileClasspath = new Path(getProject());
}
return compileClasspath;
}
@@ -297,8 +295,7 @@ public class WLJspc extends MatchingTask {
// Can be written better... this is too hacky!
jspFile = new File(files[i]);
parents = jspFile.getParent();
- int loc = 0;
-
+
if ((parents != null) && (!("").equals(parents))) {
parents = this.replaceString(parents, File.separator, "_/");
pack = pathToPackage + File.separator + "_" + parents;