svn commit: r1858180 - /ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/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: r1858180 - /ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java

jleroux@apache.org
Author: jleroux
Date: Fri Apr 26 08:33:30 2019
New Revision: 1858180

URL: http://svn.apache.org/viewvc?rev=1858180&view=rev
Log:
Reverted: Unknown request [images]; this request does not exist or cannot be
called directly.
(OFBIZ-10895)

Partially revert r1858094, just replaces "rmaps == null" by "rmaps.isEmpty()"

As Mathieu mentioned in dev:
<<Checking for ‘null’ here is not a solution since ‘resolveURI’ contract
it to return a non-nullable collection.
This commit is only bypassing the error handling.>>

As I said in r1858094:
<<This has been somehow broken by OFBIZ-10438 but actually it was already broken
before but not for the same reason.>>

We need now to review/check how it worked in R15 where it's OK, and possibly
implements the same

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

Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java?rev=1858180&r1=1858179&r2=1858180&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java Fri Apr 26 08:33:30 2019
@@ -272,7 +272,7 @@ public class RequestHandler {
         String overrideViewUri = getOverrideViewUri(path);
 
         Collection<RequestMap> rmaps = resolveURI(ccfg, request);
-        if (rmaps == null) {
+        if (rmaps.isEmpty()) {
             if (throwRequestHandlerExceptionOnMissingLocalRequest) {
               throw new RequestHandlerException(requestMissingErrorMessage);
             } else {