roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r563482 - /roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/model/PageModel.java
Date Tue, 07 Aug 2007 12:59:09 GMT
Author: snoopdave
Date: Tue Aug  7 05:59:08 2007
New Revision: 563482

URL: http://svn.apache.org/viewvc?view=rev&rev=563482
Log:
Fixes http://opensource.atlassian.com/projects/roller/browse/ROL-1509

NPE in preview, fixed by adding null check around requestParameters reference

Modified:
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/model/PageModel.java

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/model/PageModel.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/model/PageModel.java?view=diff&rev=563482&r1=563481&r2=563482
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/model/PageModel.java
(original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/model/PageModel.java
Tue Aug  7 05:59:08 2007
@@ -305,9 +305,11 @@
      * Get request parameter by name.
      */
     public String getRequestParameter(String paramName) {
-        String[] values = (String[])requestParameters.get(paramName);
-        if (values != null && values.length > 0) {
-            return values[0];
+        if (requestParameters != null) {
+            String[] values = (String[])requestParameters.get(paramName);
+            if (values != null && values.length > 0) {
+                return values[0];
+            }
         }
         return null;
     }



Mime
View raw message