ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r557027 - /ant/core/trunk/src/main/org/apache/tools/ant/Project.java
Date Tue, 17 Jul 2007 18:57:41 GMT
Author: mbenson
Date: Tue Jul 17 11:57:40 2007
New Revision: 557027

URL: http://svn.apache.org/viewvc?view=rev&rev=557027
Log:
fmt/refac/accommodate non-String props (convert)

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

Modified: ant/core/trunk/src/main/org/apache/tools/ant/Project.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/Project.java?view=diff&rev=557027&r1=557026&r2=557027
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/Project.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/Project.java Tue Jul 17 11:57:40 2007
@@ -15,7 +15,6 @@
  *  limitations under the License.
  *
  */
-
 package org.apache.tools.ant;
 
 import java.io.File;
@@ -510,8 +509,7 @@
      *              Must not be <code>null</code>.
      */
     public void setProperty(String name, String value) {
-        PropertyHelper.getPropertyHelper(this).
-                setProperty(null, name, value, true);
+        PropertyHelper.getPropertyHelper(this).setProperty(name, value, true);
     }
 
     /**
@@ -580,7 +578,8 @@
      *         or if a <code>null</code> name is provided.
      */
     public String getProperty(String propertyName) {
-        return (String) PropertyHelper.getPropertyHelper(this).getProperty(propertyName);
+        Object value = PropertyHelper.getPropertyHelper(this).getProperty(propertyName);
+        return value == null ? null : String.valueOf(value);
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message