Hello Jacques,
[hidden email] writes: > Modified: ofbiz/ofbiz-framework/branches/release18.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java > URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release18.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java?rev=1858094&r1=1858093&r2=1858094&view=diff > ============================================================================== > --- ofbiz/ofbiz-framework/branches/release18.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java (original) > +++ ofbiz/ofbiz-framework/branches/release18.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java Thu Apr 25 08:26:07 2019 > @@ -22,6 +22,7 @@ import static org.apache.ofbiz.base.util > > import java.io.IOException; > import java.io.Serializable; > +import java.net.MalformedURLException; > import java.net.URL; > import java.security.cert.X509Certificate; > import java.util.Collection; > @@ -38,6 +39,7 @@ import javax.servlet.http.HttpServletReq > import javax.servlet.http.HttpServletResponse; > import javax.servlet.http.HttpSession; > > +import org.apache.ofbiz.base.location.FlexibleLocation; > import org.apache.ofbiz.base.util.Debug; > import org.apache.ofbiz.base.util.SSLUtil; > import org.apache.ofbiz.base.util.StringUtil; > @@ -267,7 +269,7 @@ public class RequestHandler { > String overrideViewUri = getOverrideViewUri(path); > > Collection<RequestMap> rmaps = resolveURI(ccfg, request); > - if (rmaps.isEmpty()) { > + if (rmaps == null) { > if (throwRequestHandlerExceptionOnMissingLocalRequest) { > throw new RequestHandlerException(requestMissingErrorMessage); > } else { 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. I think it might a good idea to revert and reopen OFBIZ-10895. Thanks. -- Mathieu Lirzin GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37 |
Administrator
|
Hi Mathieu,
You are right, we need to review why and how it worked in R15, as I said not an easy task. I revert Jacques Le 25/04/2019 à 14:59, Mathieu Lirzin a écrit : > Hello Jacques, > > [hidden email] writes: > >> Modified: ofbiz/ofbiz-framework/branches/release18.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java >> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release18.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java?rev=1858094&r1=1858093&r2=1858094&view=diff >> ============================================================================== >> --- ofbiz/ofbiz-framework/branches/release18.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java (original) >> +++ ofbiz/ofbiz-framework/branches/release18.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java Thu Apr 25 08:26:07 2019 >> @@ -22,6 +22,7 @@ import static org.apache.ofbiz.base.util >> >> import java.io.IOException; >> import java.io.Serializable; >> +import java.net.MalformedURLException; >> import java.net.URL; >> import java.security.cert.X509Certificate; >> import java.util.Collection; >> @@ -38,6 +39,7 @@ import javax.servlet.http.HttpServletReq >> import javax.servlet.http.HttpServletResponse; >> import javax.servlet.http.HttpSession; >> >> +import org.apache.ofbiz.base.location.FlexibleLocation; >> import org.apache.ofbiz.base.util.Debug; >> import org.apache.ofbiz.base.util.SSLUtil; >> import org.apache.ofbiz.base.util.StringUtil; >> @@ -267,7 +269,7 @@ public class RequestHandler { >> String overrideViewUri = getOverrideViewUri(path); >> >> Collection<RequestMap> rmaps = resolveURI(ccfg, request); >> - if (rmaps.isEmpty()) { >> + if (rmaps == null) { >> if (throwRequestHandlerExceptionOnMissingLocalRequest) { >> throw new RequestHandlerException(requestMissingErrorMessage); >> } else { > 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. > > I think it might a good idea to revert and reopen OFBIZ-10895. > > Thanks. > |
Administrator
|
In reply to this post by Mathieu Lirzin
Le 25/04/2019 à 14:59, Mathieu Lirzin a écrit :
> I think it might a good idea to revert and reopen OFBIZ-10895. Done Jacques |
Free forum by Nabble | Edit this page |