ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1061822 - /ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java
Date Fri, 21 Jan 2011 14:33:48 GMT
Author: bodewig
Date: Fri Jan 21 14:33:47 2011
New Revision: 1061822

URL: http://svn.apache.org/viewvc?rev=1061822&view=rev
Log:
fall back to system properties for build.sysclasspath if there is no project instance

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java?rev=1061822&r1=1061821&r2=1061822&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java Fri Jan 21 14:33:47 2011
@@ -27,6 +27,7 @@ import java.util.Stack;
 import java.util.Vector;
 
 import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.MagicNames;
 import org.apache.tools.ant.PathTokenizer;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.types.resources.Union;
@@ -552,11 +553,11 @@ public class Path extends DataType imple
         Path result = new Path(getProject());
 
         String order = defValue;
-        if (getProject() != null) {
-            String o = getProject().getProperty("build.sysclasspath");
-            if (o != null) {
-                order = o;
-            }
+        String o = getProject() != null 
+            ? getProject().getProperty(MagicNames.BUILD_SYSCLASSPATH)
+            : System.getProperty(MagicNames.BUILD_SYSCLASSPATH);
+        if (o != null) {
+            order = o;
         }
         if (order.equals("only")) {
             // only: the developer knows what (s)he is doing
@@ -574,7 +575,8 @@ public class Path extends DataType imple
         } else {
             // last: don't trust the developer
             if (!order.equals("last")) {
-                log("invalid value for build.sysclasspath: " + order,
+                log("invalid value for " + MagicNames.BUILD_SYSCLASSPATH
+                    + ": " + order,
                     Project.MSG_WARN);
             }
             result.addExisting(this);



Mime
View raw message