svn commit: r926197 - /ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r926197 - /ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java

lektran
Author: lektran
Date: Mon Mar 22 17:14:58 2010
New Revision: 926197

URL: http://svn.apache.org/viewvc?rev=926197&view=rev
Log:
Fix null checks, pathInfo may be null but pathParsed won't be.

Modified:
    ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java?rev=926197&r1=926196&r2=926197&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java Mon Mar 22 17:14:58 2010
@@ -94,10 +94,10 @@ public class CmsEvents {
         String mapKey = null;
 
         String pathInfo = request.getPathInfo();
-        if (targetRequest.equals(actualRequest)) {
+        if (targetRequest.equals(actualRequest) && pathInfo != null) {
             // was called directly -- path info is everything after the request
             String[] pathParsed = pathInfo.split("/", 3);
-            if (pathParsed != null && pathParsed.length > 2) {
+            if (pathParsed.length > 2) {
                 pathInfo = pathParsed[2];
             } else {
                 pathInfo = null;