Browse Source

fmt/refac/accommodate non-String props (convert)

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@557027 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 18 years ago
parent
commit
515ac84c17
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      src/main/org/apache/tools/ant/Project.java

+ 3
- 4
src/main/org/apache/tools/ant/Project.java View File

@@ -15,7 +15,6 @@
* limitations under the License. * limitations under the License.
* *
*/ */

package org.apache.tools.ant; package org.apache.tools.ant;


import java.io.File; import java.io.File;
@@ -510,8 +509,7 @@ public class Project implements ResourceFactory {
* Must not be <code>null</code>. * Must not be <code>null</code>.
*/ */
public void setProperty(String name, String value) { 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 @@ public class Project implements ResourceFactory {
* or if a <code>null</code> name is provided. * or if a <code>null</code> name is provided.
*/ */
public String getProperty(String propertyName) { 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);
} }


/** /**


Loading…
Cancel
Save