roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r522168 - /incubator/roller/trunk/src/org/apache/roller/config/RollerRuntimeConfig.java
Date Sun, 25 Mar 2007 06:10:46 GMT
Author: agilliland
Date: Sat Mar 24 23:10:45 2007
New Revision: 522168

URL: http://svn.apache.org/viewvc?view=rev&rev=522168
Log:
fix for ROL-1381, potential null pointer in RollerRuntimeConfig.


Modified:
    incubator/roller/trunk/src/org/apache/roller/config/RollerRuntimeConfig.java

Modified: incubator/roller/trunk/src/org/apache/roller/config/RollerRuntimeConfig.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/config/RollerRuntimeConfig.java?view=diff&rev=522168&r1=522167&r2=522168
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/config/RollerRuntimeConfig.java (original)
+++ incubator/roller/trunk/src/org/apache/roller/config/RollerRuntimeConfig.java Sat Mar 24
23:10:45 2007
@@ -21,13 +21,13 @@
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.StringWriter;
-import java.util.Properties;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.roller.config.runtime.RuntimeConfigDefs;
 import org.apache.roller.config.runtime.RuntimeConfigDefsParser;
 import org.apache.roller.business.PropertiesManager;
 import org.apache.roller.business.RollerFactory;
+import org.apache.roller.pojos.RollerPropertyData;
 
 
 /**
@@ -64,7 +64,10 @@
         
         try {
             PropertiesManager pmgr = RollerFactory.getRoller().getPropertiesManager();
-            value = pmgr.getProperty(name).getValue();
+            RollerPropertyData prop = pmgr.getProperty(name);
+            if(prop != null) {
+                value = prop.getValue();
+            }
         } catch(Exception e) {
             log.warn("Trouble accessing property: "+name, e);
         }



Mime
View raw message