Hi Mathieu,

Yes you are right, the whole file should be reformatted.

This "around 120 chars max" rule is "new" (few years) and most of the code 
there is more than a decade.

If nobody disagree we could have a task Jira to reformat the code of the most important classes (with subtasks maybe, or simply patches for concerned classes).

Jacques


Le 25/10/2018 à 22:50, Mathieu Lirzin a écrit :
Hello,

[email protected] writes:

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=1844729&r1=1844728&r2=1844729&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
 Wed Oct 24 07:55:37 2018
@@ -695,6 +695,10 @@ public class RequestHandler {
              if ("url".equals(nextRequestResponse.type)) {
                  if (Debug.verboseOn()) 
Debug.logVerbose("[RequestHandler.doRequest]: Response is a URL redirect." + 
showSessionId(request), module);
                  callRedirect(nextRequestResponse.value, response, request, 
ccfg.getStatusCodeString());
+            } else if ("url-redirect".equals(nextRequestResponse.type)) {
+                // check for a cross-application redirect
+                if (Debug.verboseOn()) 
Debug.logVerbose("[RequestHandler.doRequest]: Response is a URL redirect with 
redirect parameters." + showSessionId(request), module);
+                callRedirect(nextRequestResponse.value + 
this.makeQueryString(request, nextRequestResponse), response, request, 
ccfg.getStatusCodeString());
              } else if ("cross-redirect".equals(nextRequestResponse.type)) {
                  // check for a cross-application redirect
                  if (Debug.verboseOn()) 
Debug.logVerbose("[RequestHandler.doRequest]: Response is a Cross-Application 
redirect." + showSessionId(request), module);
I have a just bought a huge 4K screen so I think it should be formatted
this way instead:

--8<---------------cut here---------------start------------->8---
// check for a cross-application redirect
else if ("url-redirect".equals(nextRequestResponse.type)) { if (Debug.verboseOn()) 
Debug.logVerbose("[RequestHandler.doRequest]: Response is a URL redirect with redirect 
parameters." + showSessionId(request), module); callRedirect(nextRequestResponse.value + 
this.makeQueryString(request, nextRequestResponse), response, request, ccfg.getStatusCodeString()); 
}
--8<---------------cut here---------------end--------------->8---

Joke aside :-), it would be *really* great if people could make an
effort sticking to the convention of using no more than 120 characters
per line which is already enough to make my eyes bleed.

Thanks.


Reply via email to