You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2017/12/16 19:00:20 UTC

svn commit: r1818445 - in /ofbiz/ofbiz-framework/trunk: applications/content/src/main/java/org/apache/ofbiz/content/cms/ applications/order/src/main/java/org/apache/ofbiz/order/order/ applications/party/src/main/java/org/apache/ofbiz/party/communicatio...

Author: jleroux
Date: Sat Dec 16 19:00:19 2017
New Revision: 1818445

URL: http://svn.apache.org/viewvc?rev=1818445&view=rev
Log:
Improved: Always check if debug verbose is on when using Debug.logVerbose()
(OFBIZ-10052)

This completes the work done so far by removing double check in cases not using 
brackets, like
if (Debug.verboseOn())
  if (Debug.verboseOn()) Debug.logVerbose()

Thanks: Michael for reporting this case I missed.

Modified:
    ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/cms/CmsEvents.java
    ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
    ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/communication/CommunicationEventServices.java
    ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/SSLUtil.java
    ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelReader.java
    ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/JNDITransactionFactory.java
    ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/callops/CallSimpleMethod.java
    ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/Iterate.java
    ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/IterateMap.java
    ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/SetOperation.java
    ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/group/GroupModel.java
    ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java
    ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlServlet.java
    ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizUrlTransform.java
    ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelAction.java
    ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTreeAction.java
    ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java
    ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java

Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/cms/CmsEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/cms/CmsEvents.java?rev=1818445&r1=1818444&r2=1818445&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/cms/CmsEvents.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/cms/CmsEvents.java Sat Dec 16 19:00:19 2017
@@ -247,12 +247,14 @@ public class CmsEvents {
                         Debug.logError(e, module);
                     }
                     if (errorPage != null) {
-                        if (Debug.verboseOn())
-                            if (Debug.verboseOn()) Debug.logVerbose("Found error pages " + statusCode + " : " + errorPage, module);
+                        if (Debug.verboseOn()) {
+                             Debug.logVerbose("Found error pages " + statusCode + " : " + errorPage, module);
+                        }
                         contentId = errorPage.getString("contentId");
                     } else {
-                        if (Debug.verboseOn())
-                            if (Debug.verboseOn()) Debug.logVerbose("No specific error page, falling back to the Error Container for " + statusCode, module);
+                        if (Debug.verboseOn()) {
+                             Debug.logVerbose("No specific error page, falling back to the Error Container for " + statusCode, module);
+                        }
                         contentId = errorContainer.getString("contentId");
                     }
                     mapKey = null;

Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java?rev=1818445&r1=1818444&r2=1818445&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java Sat Dec 16 19:00:19 2017
@@ -4391,8 +4391,9 @@ public class OrderServices {
             }
         }
 
-        if (Debug.verboseOn())
-            if (Debug.verboseOn()) Debug.logVerbose("To Store Contains: " + toStore, module);
+        if (Debug.verboseOn()) {
+             Debug.logVerbose("To Store Contains: " + toStore, module);
+        }
 
         // remove any order item attributes that were set to empty
         try {

Modified: ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/communication/CommunicationEventServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/communication/CommunicationEventServices.java?rev=1818445&r1=1818444&r2=1818445&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/communication/CommunicationEventServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/communication/CommunicationEventServices.java Sat Dec 16 19:00:19 2017
@@ -1181,7 +1181,7 @@ public class CommunicationEventServices
                     part2Text = "";
                 }
                 if (Debug.verboseOn()) {
-                    Debug.logVerbose("Part 2 Text :\n\n" + part2Text, module);
+                     Debug.logVerbose("Part 2 Text :\n\n" + part2Text, module);
                 }
 
                 // find the "Action" element and obtain its value (looking for "failed")
@@ -1199,7 +1199,7 @@ public class CommunicationEventServices
                         part3Text = "";
                     }
                     if (Debug.verboseOn()) {
-                        Debug.logVerbose("Part 3 Text :\n\n" + part3Text, module);
+                         Debug.logVerbose("Part 3 Text :\n\n" + part3Text, module);
                     }
 
                     // find the "Message-Id" element and obtain its value (looking for "failed")

Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/SSLUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/SSLUtil.java?rev=1818445&r1=1818444&r2=1818445&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/SSLUtil.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/SSLUtil.java Sat Dec 16 19:00:19 2017
@@ -133,10 +133,11 @@ public final class SSLUtil {
                 if (ks != null) {
                     List<KeyManager> newKeyManagers = Arrays.asList(getKeyManagers(ks, ksi.getPassword(), alias));
                     keyMgrs.addAll(newKeyManagers);
-                    if (Debug.verboseOn())
-                        if (Debug.verboseOn()) Debug.logVerbose("Loaded another cert store, adding [" + newKeyManagers.size()
+                    if (Debug.verboseOn()) {
+                        Debug.logVerbose("Loaded another cert store, adding [" + newKeyManagers.size()
                                 + "] KeyManagers for alias [" + alias + "] and keystore: " + ksi.createResourceHandler()
                                         .getFullLocation(), module);
+                    }
                 } else {
                     throw new IOException("Unable to load keystore: " + ksi.createResourceHandler().getFullLocation());
                 }

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelReader.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelReader.java?rev=1818445&r1=1818444&r2=1818445&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelReader.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelReader.java Sat Dec 16 19:00:19 2017
@@ -179,11 +179,13 @@ public class ModelReader implements Seri
             modelEntity.setLocation(resourceLocation);
             // utilTimer.timerString(" After entityCache.put -- " + i + " --");
             if (isEntity) {
-                if (Debug.verboseOn())
-                    if (Debug.verboseOn()) Debug.logVerbose("-- [Entity]: #" + i + ": " + entityName, module);
+                if (Debug.verboseOn()) {
+                     Debug.logVerbose("-- [Entity]: #" + i + ": " + entityName, module);
+                }
             } else {
-                if (Debug.verboseOn())
-                    if (Debug.verboseOn()) Debug.logVerbose("-- [ViewEntity]: #" + i + ": " + entityName, module);
+                if (Debug.verboseOn()) {
+                     Debug.logVerbose("-- [ViewEntity]: #" + i + ": " + entityName, module);
+                }
             }
         } else {
             Debug.logWarning("-- -- ENTITYGEN ERROR:getModelEntity: Could not create " +

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/JNDITransactionFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/JNDITransactionFactory.java?rev=1818445&r1=1818444&r2=1818445&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/JNDITransactionFactory.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/JNDITransactionFactory.java Sat Dec 16 19:00:19 2017
@@ -175,7 +175,7 @@ public class JNDITransactionFactory impl
 
             if (ds != null) {
                 if (Debug.verboseOn()) {
-                    Debug.logVerbose("Got a Datasource object.", module);
+                     Debug.logVerbose("Got a Datasource object.", module);
                 }
                 dsCache.putIfAbsent(jndiName, ds);
                 ds = dsCache.get(jndiName);

Modified: ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/callops/CallSimpleMethod.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/callops/CallSimpleMethod.java?rev=1818445&r1=1818444&r2=1818445&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/callops/CallSimpleMethod.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/callops/CallSimpleMethod.java Sat Dec 16 19:00:19 2017
@@ -110,8 +110,9 @@ public final class CallSimpleMethod exte
             localContext = new MethodContext(localEnv, methodContext.getLoader(), methodContext.getMethodType());
         }
         String returnVal = simpleMethodToCall.exec(localContext);
-        if (Debug.verboseOn())
-            if (Debug.verboseOn()) Debug.logVerbose("Called simple-method named [" + this.methodName + "] in resource [" + this.xmlResource + "], returnVal is [" + returnVal + "]", module);
+        if (Debug.verboseOn()) {
+             Debug.logVerbose("Called simple-method named [" + this.methodName + "] in resource [" + this.xmlResource + "], returnVal is [" + returnVal + "]", module);
+        }
         if (simpleMethodToCall.getDefaultErrorCode().equals(returnVal)) {
             if (methodContext.getMethodType() == MethodContext.EVENT) {
                 methodContext.putEnv(simpleMethod.getEventResponseCodeName(), simpleMethod.getDefaultErrorCode());

Modified: ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/Iterate.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/Iterate.java?rev=1818445&r1=1818444&r2=1818445&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/Iterate.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/Iterate.java Sat Dec 16 19:00:19 2017
@@ -68,8 +68,9 @@ public final class Iterate extends Metho
     @Override
     public boolean exec(MethodContext methodContext) throws MiniLangException {
         if (listFma.isEmpty()) {
-            if (Debug.verboseOn())
-                if (Debug.verboseOn()) Debug.logVerbose("Collection not found, doing nothing: " + this, module);
+            if (Debug.verboseOn()) {
+                 Debug.logVerbose("Collection not found, doing nothing: " + this, module);
+            }
             return true;
         }
         Object oldEntryValue = entryFma.get(methodContext.getEnvMap());
@@ -101,8 +102,9 @@ public final class Iterate extends Metho
         } else if (objList instanceof Collection<?>) {
             Collection<Object> theCollection = UtilGenerics.checkCollection(objList);
             if (theCollection.size() == 0) {
-                if (Debug.verboseOn())
-                    if (Debug.verboseOn()) Debug.logVerbose("Collection has zero entries, doing nothing: " + this, module);
+                if (Debug.verboseOn()) {
+                     Debug.logVerbose("Collection has zero entries, doing nothing: " + this, module);
+                }
                 return true;
             }
             for (Object theEntry : theCollection) {
@@ -126,8 +128,9 @@ public final class Iterate extends Metho
         } else if (objList instanceof Iterator<?>) {
             Iterator<Object> theIterator = UtilGenerics.cast(objList);
             if (!theIterator.hasNext()) {
-                if (Debug.verboseOn())
-                    if (Debug.verboseOn()) Debug.logVerbose("Iterator has zero entries, doing nothing: " + this, module);
+                if (Debug.verboseOn()) {
+                     Debug.logVerbose("Iterator has zero entries, doing nothing: " + this, module);
+                }
                 return true;
             }
             while (theIterator.hasNext()) {

Modified: ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/IterateMap.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/IterateMap.java?rev=1818445&r1=1818444&r2=1818445&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/IterateMap.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/IterateMap.java Sat Dec 16 19:00:19 2017
@@ -70,22 +70,26 @@ public final class IterateMap extends Me
         Object oldKey = keyFma.get(methodContext.getEnvMap());
         Object oldValue = valueFma.get(methodContext.getEnvMap());
         if (oldKey != null) {
-            if (Debug.verboseOn())
-                if (Debug.verboseOn()) Debug.logVerbose("In iterate-map the key had a non-null value before entering the loop for the operation: " + this, module);
+            if (Debug.verboseOn()) {
+                 Debug.logVerbose("In iterate-map the key had a non-null value before entering the loop for the operation: " + this, module);
+            }
         }
         if (oldValue != null) {
-            if (Debug.verboseOn())
-                if (Debug.verboseOn()) Debug.logVerbose("In iterate-map the value had a non-null value before entering the loop for the operation: " + this, module);
+            if (Debug.verboseOn()) {
+                 Debug.logVerbose("In iterate-map the value had a non-null value before entering the loop for the operation: " + this, module);
+            }
         }
         Map<? extends Object, ? extends Object> theMap = mapFma.get(methodContext.getEnvMap());
         if (theMap == null) {
-            if (Debug.verboseOn())
-                if (Debug.verboseOn()) Debug.logVerbose("Map not found with name " + mapFma + ", doing nothing: " + this, module);
+            if (Debug.verboseOn()) {
+                 Debug.logVerbose("Map not found with name " + mapFma + ", doing nothing: " + this, module);
+            }
             return true;
         }
         if (theMap.size() == 0) {
-            if (Debug.verboseOn())
-                if (Debug.verboseOn()) Debug.logVerbose("Map with name " + mapFma + " has zero entries, doing nothing: " + this, module);
+            if (Debug.verboseOn()) {
+                 Debug.logVerbose("Map with name " + mapFma + " has zero entries, doing nothing: " + this, module);
+            }
             return true;
         }
         for (Map.Entry<? extends Object, ? extends Object> theEntry : theMap.entrySet()) {

Modified: ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/SetOperation.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/SetOperation.java?rev=1818445&r1=1818444&r2=1818445&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/SetOperation.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/SetOperation.java Sat Dec 16 19:00:19 2017
@@ -144,8 +144,9 @@ public final class SetOperation extends
             }
         } else if (!this.fromFma.isEmpty()) {
             newValue = this.fromFma.get(methodContext.getEnvMap());
-            if (Debug.verboseOn())
-                if (Debug.verboseOn()) Debug.logVerbose("In screen getting value for field from [" + this.fromFma.toString() + "]: " + newValue, module);
+            if (Debug.verboseOn()) {
+                 Debug.logVerbose("In screen getting value for field from [" + this.fromFma.toString() + "]: " + newValue, module);
+            }
         } else if (!this.valueFse.isEmpty()) {
             newValue = this.valueFse.expand(methodContext.getEnvMap());
             isConstant = true;
@@ -156,13 +157,15 @@ public final class SetOperation extends
             isConstant = true;
         }
         if (!setIfNull && newValue == null && !"NewMap".equals(this.type) && !"NewList".equals(this.type)) {
-            if (Debug.verboseOn())
-                if (Debug.verboseOn()) Debug.logVerbose("Field value not found (null) with name [" + fromFma + "] and value [" + valueFse + "], and there was not default value, not setting field", module);
+            if (Debug.verboseOn()) {
+                 Debug.logVerbose("Field value not found (null) with name [" + fromFma + "] and value [" + valueFse + "], and there was not default value, not setting field", module);
+            }
             return true;
         }
         if (!setIfEmpty && ObjectType.isEmpty(newValue)) {
-            if (Debug.verboseOn())
-                if (Debug.verboseOn()) Debug.logVerbose("Field value not found (empty) with name [" + fromFma + "] and value [" + valueFse + "], and there was not default value, not setting field", module);
+            if (Debug.verboseOn()) {
+                 Debug.logVerbose("Field value not found (empty) with name [" + fromFma + "] and value [" + valueFse + "], and there was not default value, not setting field", module);
+            }
             return true;
         }
         if (this.type.length() > 0) {
@@ -194,8 +197,9 @@ public final class SetOperation extends
                 }
             }
         }
-        if (Debug.verboseOn())
-            if (Debug.verboseOn()) Debug.logVerbose("Setting field [" + this.fieldFma.toString() + "] to value: " + newValue, module);
+        if (Debug.verboseOn()) {
+             Debug.logVerbose("Setting field [" + this.fieldFma.toString() + "] to value: " + newValue, module);
+        }
         this.fieldFma.put(methodContext.getEnvMap(), newValue);
         return true;
     }

Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/group/GroupModel.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/group/GroupModel.java?rev=1818445&r1=1818444&r2=1818445&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/group/GroupModel.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/group/GroupModel.java Sat Dec 16 19:00:19 2017
@@ -70,8 +70,9 @@ public class GroupModel {
                     + "] found with OLD 'service' attribute, change to use 'invoke'", module);
         }
 
-        if (Debug.verboseOn())
-            if (Debug.verboseOn()) Debug.logVerbose("Created Service Group Model --> " + this, module);
+        if (Debug.verboseOn()) {
+             Debug.logVerbose("Created Service Group Model --> " + this, module);
+        }
     }
 
     /**
@@ -160,11 +161,13 @@ public class GroupModel {
         Map<String, Object> runContext = UtilMisc.makeMapWritable(context);
         Map<String, Object> result = new HashMap<String, Object>();
         for (GroupServiceModel model : services) {
-            if (Debug.verboseOn())
-                if (Debug.verboseOn()) Debug.logVerbose("Using Context: " + runContext, module);
+            if (Debug.verboseOn()) {
+                 Debug.logVerbose("Using Context: " + runContext, module);
+            }
             Map<String, Object> thisResult = model.invoke(dispatcher, localName, runContext);
-            if (Debug.verboseOn())
-                if (Debug.verboseOn()) Debug.logVerbose("Result: " + thisResult, module);
+            if (Debug.verboseOn()) {
+                 Debug.logVerbose("Result: " + thisResult, module);
+            }
 
             // make sure we didn't fail
             if (ServiceUtil.isError(thisResult)) {

Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java?rev=1818445&r1=1818444&r2=1818445&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java Sat Dec 16 19:00:19 2017
@@ -164,8 +164,9 @@ public class ConfigXMLReader {
             if (!"site-conf".equalsIgnoreCase(rootElement.getTagName())) {
                 rootElement = UtilXml.firstChildElement(rootElement, "site-conf");
             }
-            if (Debug.verboseOn())
-                if (Debug.verboseOn()) Debug.logVerbose("Loaded XML Config - " + location, module);
+            if (Debug.verboseOn()) {
+                 Debug.logVerbose("Loaded XML Config - " + location, module);
+            }
             return rootElement;
         } catch (Exception e) {
             Debug.logError(e, module);

Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlServlet.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlServlet.java?rev=1818445&r1=1818444&r2=1818445&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlServlet.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlServlet.java Sat Dec 16 19:00:19 2017
@@ -140,8 +140,9 @@ public class ControlServlet extends Http
             contextPath = "";
         }
         request.setAttribute("_CONTROL_PATH_", contextPath + request.getServletPath());
-        if (Debug.verboseOn())
-            if (Debug.verboseOn()) Debug.logVerbose("Control Path: " + request.getAttribute("_CONTROL_PATH_"), module);
+        if (Debug.verboseOn()) {
+             Debug.logVerbose("Control Path: " + request.getAttribute("_CONTROL_PATH_"), module);
+        }
 
         // for convenience, and necessity with event handlers, make security and delegator available in the request:
         // try to get it from the session first so that we can have a delegator/dispatcher/security for a certain user if desired

Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizUrlTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizUrlTransform.java?rev=1818445&r1=1818444&r2=1818445&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizUrlTransform.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizUrlTransform.java Sat Dec 16 19:00:19 2017
@@ -74,8 +74,9 @@ public class OfbizUrlTransform implement
     private static String convertToString(Object o) {
         String result = "";
         if (o != null) {
-            if (Debug.verboseOn())
-                if (Debug.verboseOn()) Debug.logVerbose("Arg Object : " + o.getClass().getName(), module);
+            if (Debug.verboseOn()) {
+                 Debug.logVerbose("Arg Object : " + o.getClass().getName(), module);
+            }
             if (o instanceof TemplateScalarModel) {
                 TemplateScalarModel s = (TemplateScalarModel) o;
                 try {

Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelAction.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelAction.java?rev=1818445&r1=1818444&r2=1818445&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelAction.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelAction.java Sat Dec 16 19:00:19 2017
@@ -135,8 +135,9 @@ public abstract class AbstractModelActio
         if (actions == null)
             return;
         for (ModelAction action : actions) {
-            if (Debug.verboseOn())
-                if (Debug.verboseOn()) Debug.logVerbose("Running action " + action.getClass().getName(), module);
+            if (Debug.verboseOn()) {
+                 Debug.logVerbose("Running action " + action.getClass().getName(), module);
+            }
             try {
                 action.runAction(context);
             } catch (GeneralException e) {
@@ -154,8 +155,9 @@ public abstract class AbstractModelActio
 
     protected AbstractModelAction(ModelWidget modelWidget, Element actionElement) {
         this.modelWidget = modelWidget;
-        if (Debug.verboseOn())
-            if (Debug.verboseOn()) Debug.logVerbose("Reading widget action with name: " + actionElement.getNodeName(), module);
+        if (Debug.verboseOn()) {
+             Debug.logVerbose("Reading widget action with name: " + actionElement.getNodeName(), module);
+        }
     }
 
     /**
@@ -803,9 +805,9 @@ public abstract class AbstractModelActio
                 if (!this.fromField.isEmpty()) {
                     HttpSession session = (HttpSession) context.get("session");
                     newValue = getInMemoryPersistedFromField(session, context);
-                    if (Debug.verboseOn())
-                        if (Debug.verboseOn()) Debug.logVerbose("In user getting value for field from [" + this.fromField.getOriginalName() + "]: "
-                                + newValue, module);
+                    if (Debug.verboseOn()) {
+                         Debug.logVerbose("In user getting value for field from [" + this.fromField.getOriginalName() + "]: " + newValue, module);
+                    }
                 } else if (!this.valueExdr.isEmpty()) {
                     newValue = this.valueExdr.expand(context);
                 }
@@ -813,18 +815,18 @@ public abstract class AbstractModelActio
                 if (!this.fromField.isEmpty()) {
                     ServletContext servletContext = (ServletContext) context.get("application");
                     newValue = getInMemoryPersistedFromField(servletContext, context);
-                    if (Debug.verboseOn())
-                        if (Debug.verboseOn()) Debug.logVerbose("In application getting value for field from [" + this.fromField.getOriginalName()
-                                + "]: " + newValue, module);
+                    if (Debug.verboseOn()) {
+                         Debug.logVerbose("In application getting value for field from [" + this.fromField.getOriginalName() + "]: " + newValue, module);
+                    }
                 } else if (!this.valueExdr.isEmpty()) {
                     newValue = this.valueExdr.expandString(context);
                 }
             } else {
                 if (!this.fromField.isEmpty()) {
                     newValue = this.fromField.get(context);
-                    if (Debug.verboseOn())
-                        if (Debug.verboseOn()) Debug.logVerbose("Getting value for field from [" + this.fromField.getOriginalName() + "]: " + newValue,
-                                module);
+                    if (Debug.verboseOn()) {
+                         Debug.logVerbose("Getting value for field from [" + this.fromField.getOriginalName() + "]: " + newValue, module);
+                    }
                 } else if (!this.valueExdr.isEmpty()) {
                     newValue = this.valueExdr.expand(context);
                 }
@@ -873,9 +875,9 @@ public abstract class AbstractModelActio
                 newKey += originalName;
                 HttpSession session = (HttpSession) context.get("session");
                 session.setAttribute(newKey, newValue);
-                if (Debug.verboseOn())
-                    if (Debug.verboseOn()) Debug.logVerbose("In user setting value for field from [" + this.field.getOriginalName() + "]: " + newValue,
-                            module);
+                if (Debug.verboseOn()) {
+                     Debug.logVerbose("In user setting value for field from [" + this.field.getOriginalName() + "]: " + newValue, module);
+                }
             } else if (this.toScope != null && "application".equals(this.toScope)) {
                 String originalName = this.field.getOriginalName();
                 List<String> currentWidgetTrail = UtilGenerics.toList(context.get("_WIDGETTRAIL_"));
@@ -889,14 +891,15 @@ public abstract class AbstractModelActio
                 newKey += originalName;
                 ServletContext servletContext = (ServletContext) context.get("application");
                 servletContext.setAttribute(newKey, newValue);
-                if (Debug.verboseOn())
-                    if (Debug.verboseOn()) Debug.logVerbose("In application setting value for field from [" + this.field.getOriginalName() + "]: "
-                            + newValue, module);
+                if (Debug.verboseOn()) {
+                     Debug.logVerbose("In application setting value for field from [" + this.field.getOriginalName() + "]: " + newValue, module);
+                }
             } else {
                 // only do this if it is not global, if global ONLY put it in the global context
                 if (!global) {
-                    if (Debug.verboseOn())
-                        if (Debug.verboseOn()) Debug.logVerbose("Setting field [" + this.field.getOriginalName() + "] to value: " + newValue, module);
+                    if (Debug.verboseOn()) {
+                         Debug.logVerbose("Setting field [" + this.field.getOriginalName() + "] to value: " + newValue, module);
+                    }
                     this.field.put(context, newValue);
                 }
             }

Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTreeAction.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTreeAction.java?rev=1818445&r1=1818444&r2=1818445&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTreeAction.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTreeAction.java Sat Dec 16 19:00:19 2017
@@ -108,15 +108,17 @@ public abstract class ModelTreeAction ex
     private final ModelTree modelTree;
 
     protected ModelTreeAction(ModelNode modelNode, Element actionElement) {
-        if (Debug.verboseOn())
-            if (Debug.verboseOn()) Debug.logVerbose("Reading Tree action with name: " + actionElement.getNodeName(), module);
+        if (Debug.verboseOn()) {
+             Debug.logVerbose("Reading Tree action with name: " + actionElement.getNodeName(), module);
+        }
         this.modelTree = modelNode.getModelTree();
         this.modelSubNode = null;
     }
 
     protected ModelTreeAction(ModelNode.ModelSubNode modelSubNode, Element actionElement) {
-        if (Debug.verboseOn())
-            if (Debug.verboseOn()) Debug.logVerbose("Reading Tree action with name: " + actionElement.getNodeName(), module);
+        if (Debug.verboseOn()) {
+             Debug.logVerbose("Reading Tree action with name: " + actionElement.getNodeName(), module);
+        }
         this.modelSubNode = modelSubNode;
         this.modelTree = modelSubNode.getNode().getModelTree();
     }

Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java?rev=1818445&r1=1818444&r2=1818445&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java Sat Dec 16 19:00:19 2017
@@ -688,8 +688,9 @@ public class FormRenderer {
         }
         Object obj = context.get(lookupName);
         if (obj == null) {
-            if (Debug.verboseOn())
-                if (Debug.verboseOn()) Debug.logVerbose("No object for list or iterator name [" + lookupName + "] found, so not rendering rows.", module);
+            if (Debug.verboseOn()) {
+                 Debug.logVerbose("No object for list or iterator name [" + lookupName + "] found, so not rendering rows.", module);
+            }
             return;
         }
         // if list is empty, do not render rows
@@ -764,8 +765,9 @@ public class FormRenderer {
                     localContext.put("formUniqueId", "_" + context.get("renderFormSeqNumber"));
                 }
 
-                if (Debug.verboseOn())
-                    if (Debug.verboseOn()) Debug.logVerbose("In form got another row, context is: " + localContext, module);
+                if (Debug.verboseOn()) {
+                     Debug.logVerbose("In form got another row, context is: " + localContext, module);
+                }
 
                 // Check to see if there is a field, same name and same use-when (could come from extended form)
                 List<ModelFormField> tempFieldList = new LinkedList<ModelFormField>();

Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java?rev=1818445&r1=1818444&r2=1818445&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java Sat Dec 16 19:00:19 2017
@@ -183,9 +183,9 @@ public final class Paginator {
         }
         Object obj = context.get(lookupName);
         if (obj == null) {
-            if (Debug.verboseOn())
-                if (Debug.verboseOn()) Debug.logVerbose("No object for list or iterator name [" + lookupName + "] found, so not running pagination.",
-                        module);
+            if (Debug.verboseOn()) {
+                 Debug.logVerbose("No object for list or iterator name [" + lookupName + "] found, so not running pagination.", module);
+            }
             return;
         }
         // if list is empty, do not render rows