diff options
-rw-r--r-- | sources/scala/tools/scala4ant/AntTask.java | 6 | ||||
-rw-r--r-- | support/ant/src.java/scala/tools/scalac4ant/AntTask.java | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sources/scala/tools/scala4ant/AntTask.java b/sources/scala/tools/scala4ant/AntTask.java index e8e7020d8b..ab9ad9ee8b 100644 --- a/sources/scala/tools/scala4ant/AntTask.java +++ b/sources/scala/tools/scala4ant/AntTask.java @@ -1,6 +1,7 @@ package scala.tools.scalac4ant; import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.Javac; import org.apache.tools.ant.util.*; import java.io.File; @@ -22,15 +23,16 @@ public class AntTask extends Javac { private String source = null; private String target = null; private FileUtils fileUtils = FileUtils.newFileUtils(); + private Project project = getProject(); public void execute() { String old = project.getProperty("build.compiler"); project.setProperty("build.compiler", "scala.tools.scalac4ant.AntAdaptor"); super.execute(); if (old == null) - project.setProperty("build.compiler", "modern"); + project.setProperty("build.compiler", "modern"); else - project.setProperty("build.compiler", old); + project.setProperty("build.compiler", old); } public void setForce(boolean fc) { diff --git a/support/ant/src.java/scala/tools/scalac4ant/AntTask.java b/support/ant/src.java/scala/tools/scalac4ant/AntTask.java index e8e7020d8b..ab9ad9ee8b 100644 --- a/support/ant/src.java/scala/tools/scalac4ant/AntTask.java +++ b/support/ant/src.java/scala/tools/scalac4ant/AntTask.java @@ -1,6 +1,7 @@ package scala.tools.scalac4ant; import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.Javac; import org.apache.tools.ant.util.*; import java.io.File; @@ -22,15 +23,16 @@ public class AntTask extends Javac { private String source = null; private String target = null; private FileUtils fileUtils = FileUtils.newFileUtils(); + private Project project = getProject(); public void execute() { String old = project.getProperty("build.compiler"); project.setProperty("build.compiler", "scala.tools.scalac4ant.AntAdaptor"); super.execute(); if (old == null) - project.setProperty("build.compiler", "modern"); + project.setProperty("build.compiler", "modern"); else - project.setProperty("build.compiler", old); + project.setProperty("build.compiler", old); } public void setForce(boolean fc) { |