cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giac...@apache.org
Subject svn commit: r597440 - /cocoon/trunk/core/cocoon-configuration/cocoon-configuration-api/src/main/java/org/apache/cocoon/configuration/PropertyHelper.java
Date Thu, 22 Nov 2007 15:49:01 GMT
Author: giacomo
Date: Thu Nov 22 07:49:00 2007
New Revision: 597440

URL: http://svn.apache.org/viewvc?rev=597440&view=rev
Log:
fixing NPE

Modified:
    cocoon/trunk/core/cocoon-configuration/cocoon-configuration-api/src/main/java/org/apache/cocoon/configuration/PropertyHelper.java

Modified: cocoon/trunk/core/cocoon-configuration/cocoon-configuration-api/src/main/java/org/apache/cocoon/configuration/PropertyHelper.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-configuration/cocoon-configuration-api/src/main/java/org/apache/cocoon/configuration/PropertyHelper.java?rev=597440&r1=597439&r2=597440&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-configuration/cocoon-configuration-api/src/main/java/org/apache/cocoon/configuration/PropertyHelper.java
(original)
+++ cocoon/trunk/core/cocoon-configuration/cocoon-configuration-api/src/main/java/org/apache/cocoon/configuration/PropertyHelper.java
Thu Nov 22 07:49:00 2007
@@ -159,8 +159,10 @@
            String value = props.getProperty(key);
            // replace
            value = replace(value, props, settings);
-           // and put back
-           props.put(key, value);
+           // and put back but prevent NPE because of null value ?!?!?
+           // TODO: How to handle value==null situations?
+           if (value != null)
+               props.put(key, value);
        }
     }
 }



Mime
View raw message