svn commit: r1818077 - in /ofbiz/ofbiz-framework/trunk: applications/content/src/main/java/org/apache/ofbiz/content/layout/ applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/ applications/product/src/main/java/org/apache/ofbiz/ship...

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

svn commit: r1818077 - in /ofbiz/ofbiz-framework/trunk: applications/content/src/main/java/org/apache/ofbiz/content/layout/ applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/ applications/product/src/main/java/org/apache/ofbiz/ship...

jleroux@apache.org
Author: jleroux
Date: Wed Dec 13 22:37:16 2017
New Revision: 1818077

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

This completes r1818075, there were still few cases, a last regexp search is
never too much :)

Found 4 other loops with Strings concatenation, but who cares, it's only
verbose logging...

There should not be anymore...

Modified:
    ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/layout/LayoutEvents.java
    ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/EditRenderSubContentCacheTransform.java
    ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/dhl/DhlServices.java
    ofbiz/ofbiz-framework/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/ICalConverter.java
    ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/GroovyUtil.java
    ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/connection/DebugManagedDataSource.java
    ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/calendar/RecurrenceInfo.java
    ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/engine/XMLRPCClientEngine.java
    ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/ServiceEventHandler.java

Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/layout/LayoutEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/layout/LayoutEvents.java?rev=1818077&r1=1818076&r2=1818077&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/layout/LayoutEvents.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/layout/LayoutEvents.java Wed Dec 13 22:37:16 2017
@@ -417,7 +417,7 @@ public class LayoutEvents {
             String mapKey = (String) paramMap.get("mapKey");
             if (Debug.verboseOn()) {
                 Debug.logVerbose("in createSubContent, contentIdTo:" + contentIdTo, module);
-                if (Debug.verboseOn()) Debug.logVerbose("in createSubContent, mapKey:" + mapKey, module);
+                Debug.logVerbose("in createSubContent, mapKey:" + mapKey, module);
             }
             Map<String, Object> context = new HashMap<String, Object>();
             List<Object> errorMessages = new LinkedList<>();

Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/EditRenderSubContentCacheTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/EditRenderSubContentCacheTransform.java?rev=1818077&r1=1818076&r2=1818077&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/EditRenderSubContentCacheTransform.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/EditRenderSubContentCacheTransform.java Wed Dec 13 22:37:16 2017
@@ -162,7 +162,7 @@ public class EditRenderSubContentCacheTr
                     if (Debug.verboseOn()) {
                         for (Entry<String, Object> ky : templateCtx.entrySet()) {
                             Object val = ky.getValue();;
-                            if (Debug.verboseOn()) Debug.logVerbose("context key: " + ky + " val: " + val, module);
+                            Debug.logVerbose("context key: " + ky + " val: " + val, module);
                         }
                     }
 

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/dhl/DhlServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/dhl/DhlServices.java?rev=1818077&r1=1818076&r2=1818077&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/dhl/DhlServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/dhl/DhlServices.java Wed Dec 13 22:37:16 2017
@@ -122,7 +122,7 @@ public class DhlServices {
 
         if (Debug.verboseOn()) {
             Debug.logVerbose("DHL Connect URL : " + conStr, module);
-            if (Debug.verboseOn()) Debug.logVerbose("DHL XML String : " + xmlString, module);
+            Debug.logVerbose("DHL XML String : " + xmlString, module);
         }
 
         HttpClient http = new HttpClient(conStr);

Modified: ofbiz/ofbiz-framework/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/ICalConverter.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/ICalConverter.java?rev=1818077&r1=1818076&r2=1818077&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/ICalConverter.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/ICalConverter.java Wed Dec 13 22:37:16 2017
@@ -368,7 +368,7 @@ public class ICalConverter {
             if (Debug.verboseOn()) {
                 try {
                     alarm.validate(true);
-                    if (Debug.verboseOn()) Debug.logVerbose("iCalendar alarm passes validation", module);
+                    Debug.logVerbose("iCalendar alarm passes validation", module);
                 } catch (ValidationException e) {
                     if (Debug.verboseOn()) Debug.logVerbose("iCalendar alarm fails validation: " + e, module);
                 }
@@ -413,7 +413,7 @@ public class ICalConverter {
         if (Debug.verboseOn()) {
             try {
                 calendar.validate(true);
-                if (Debug.verboseOn()) Debug.logVerbose("iCalendar passes validation", module);
+                Debug.logVerbose("iCalendar passes validation", module);
             } catch (ValidationException e) {
                 if (Debug.verboseOn()) Debug.logVerbose("iCalendar fails validation: " + e, module);
             }
@@ -921,7 +921,7 @@ public class ICalConverter {
         if (Debug.verboseOn()) {
             try {
                 result.validate(true);
-                if (Debug.verboseOn()) Debug.logVerbose("iCalendar component passes validation", module);
+                Debug.logVerbose("iCalendar component passes validation", module);
             } catch (ValidationException e) {
                 Debug.logVerbose(e, "iCalendar component fails validation: ", module);
             }

Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/GroovyUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/GroovyUtil.java?rev=1818077&r1=1818076&r2=1818077&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/GroovyUtil.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/GroovyUtil.java Wed Dec 13 22:37:16 2017
@@ -86,7 +86,7 @@ public class GroovyUtil {
         }
         if (Debug.verboseOn()) {
             Debug.logVerbose("Evaluating -- " + expression, module);
-            if (Debug.verboseOn()) Debug.logVerbose("Using Context -- " + context, module);
+            Debug.logVerbose("Using Context -- " + context, module);
         }
         try {
             GroovyShell shell = new GroovyShell(getBinding(context, expression));

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/connection/DebugManagedDataSource.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/connection/DebugManagedDataSource.java?rev=1818077&r1=1818076&r2=1818077&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/connection/DebugManagedDataSource.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/connection/DebugManagedDataSource.java Wed Dec 13 22:37:16 2017
@@ -43,7 +43,7 @@ public class DebugManagedDataSource exte
         if (Debug.verboseOn()) {
             if (super.getPool() instanceof GenericObjectPool) {
                 GenericObjectPool objectPool = (GenericObjectPool)super.getPool();
-                if (Debug.verboseOn()) Debug.logVerbose("Borrowing a connection from the pool; used/idle/total: " + objectPool.getNumActive() + "/" + objectPool.getNumIdle() + "/" + (objectPool.getNumActive() + objectPool.getNumIdle()) + "; min idle/max idle/max total: " + objectPool.getMinIdle() + "/" + objectPool.getMaxIdle() + "/" + objectPool.getMaxTotal(), module);
+                Debug.logVerbose("Borrowing a connection from the pool; used/idle/total: " + objectPool.getNumActive() + "/" + objectPool.getNumIdle() + "/" + (objectPool.getNumActive() + objectPool.getNumIdle()) + "; min idle/max idle/max total: " + objectPool.getMinIdle() + "/" + objectPool.getMaxIdle() + "/" + objectPool.getMaxTotal(), module);
             } else {
                 if (Debug.verboseOn()) Debug.logVerbose("Borrowing a connection from the pool; used/idle/total: " + super.getPool().getNumActive() + "/" + super.getPool().getNumIdle() + "/" + (super.getPool().getNumActive() + super.getPool().getNumIdle()), module);
             }

Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/calendar/RecurrenceInfo.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/calendar/RecurrenceInfo.java?rev=1818077&r1=1818076&r2=1818077&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/calendar/RecurrenceInfo.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/calendar/RecurrenceInfo.java Wed Dec 13 22:37:16 2017
@@ -206,7 +206,7 @@ public class RecurrenceInfo {
 
         if (Debug.verboseOn()) {
             Debug.logVerbose("Date List Size: " + (rDateList == null ? 0 : rDateList.size()), module);
-            if (Debug.verboseOn()) Debug.logVerbose("Rule List Size: " + (rRulesList == null ? 0 : rRulesList.size()), module);
+            Debug.logVerbose("Rule List Size: " + (rRulesList == null ? 0 : rRulesList.size()), module);
         }
 
         // Check the rules and date list

Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/engine/XMLRPCClientEngine.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/engine/XMLRPCClientEngine.java?rev=1818077&r1=1818076&r2=1818077&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/engine/XMLRPCClientEngine.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/engine/XMLRPCClientEngine.java Wed Dec 13 22:37:16 2017
@@ -122,7 +122,7 @@ public class XMLRPCClientEngine extends
         if (Debug.verboseOn()) {
             Debug.logVerbose("[XMLRPCClientEngine.invoke] : Parameter length - " + inModelParamList.size(), module);
             for (ModelParam p: inModelParamList) {
-                if (Debug.verboseOn()) Debug.logVerbose("[XMLRPCClientEngine.invoke} : Parameter: " + p.name + " (" + p.mode + ")", module);
+                Debug.logVerbose("[XMLRPCClientEngine.invoke} : Parameter: " + p.name + " (" + p.mode + ")", module);
             }
         }
 

Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/ServiceEventHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/ServiceEventHandler.java?rev=1818077&r1=1818076&r2=1818077&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/ServiceEventHandler.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/ServiceEventHandler.java Wed Dec 13 22:37:16 2017
@@ -128,7 +128,7 @@ public class ServiceEventHandler impleme
 
         if (Debug.verboseOn()) {
             Debug.logVerbose("[Processing]: SERVICE Event", module);
-            if (Debug.verboseOn()) Debug.logVerbose("[Using delegator]: " + dispatcher.getDelegator().getDelegatorName(), module);
+            Debug.logVerbose("[Using delegator]: " + dispatcher.getDelegator().getDelegatorName(), module);
         }
 
         boolean isMultiPart = ServletFileUpload.isMultipartContent(request);