svn commit: r561320 - /ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java

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

svn commit: r561320 - /ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java

jacopoc
Author: jacopoc
Date: Tue Jul 31 06:13:17 2007
New Revision: 561320

URL: http://svn.apache.org/viewvc?view=rev&rev=561320
Log:
Code cleanups: no functional changes.

Modified:
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java

Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?view=diff&rev=561320&r1=561319&r2=561320
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java Tue Jul 31 06:13:17 2007
@@ -512,22 +512,18 @@
 
     public static String getNextPageUri(String path) {
         List pathInfo = StringUtil.split(path, "/");
-        String nextPage = null;
         if (pathInfo == null) {
-            return nextPage;
+            return null;
         }
 
+        String nextPage = null;
         for (int i = 1; i < pathInfo.size(); i++) {
             String element = (String) pathInfo.get(i);
             if (element.indexOf('~') != 0) {
                 if (element.indexOf('?') > -1) {
                     element = element.substring(0, element.indexOf('?'));
                 }
-                if (i == 1) {
-                    nextPage = element;
-                } else {
-                    nextPage = (nextPage == null ? element : nextPage + "/" + element);
-                }
+                nextPage = (nextPage == null ? element : nextPage + "/" + element);
             }
         }
         return nextPage;