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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to