ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r426648 - /ant/core/trunk/src/main/org/apache/tools/ant/types/PropertySet.java
Date Fri, 28 Jul 2006 19:10:22 GMT
Author: bodewig
Date: Fri Jul 28 12:10:22 2006
New Revision: 426648

URL: http://svn.apache.org/viewvc?rev=426648&view=rev
Log:
avoid NPE in border-cases

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

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/PropertySet.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/PropertySet.java?rev=426648&r1=426647&r2=426648&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/PropertySet.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/PropertySet.java Fri Jul 28 12:10:22
2006
@@ -320,6 +320,9 @@
         for (Iterator iter = names.iterator(); iter.hasNext();) {
             String name = (String) iter.next();
             String value = (String) props.get(name);
+            if (value != null) {
+                // may be null if a system property has been added
+                // after the project instance has been initialized
             if (m != null) {
                 //map the names
                 String[] newname = m.mapFileName(name);
@@ -328,6 +331,7 @@
                 }
             }
             properties.setProperty(name, value);
+            }
         }
         return properties;
     }



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


Mime
View raw message