diff --git a/applications/content/src/main/java/org/apache/ofbiz/content/cms/CmsEvents.java b/applications/content/src/main/java/org/apache/ofbiz/content/cms/CmsEvents.java index 59245c6ded..45eb4fae0d 100644 --- a/applications/content/src/main/java/org/apache/ofbiz/content/cms/CmsEvents.java +++ b/applications/content/src/main/java/org/apache/ofbiz/content/cms/CmsEvents.java @@ -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; diff --git a/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java b/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java index 7281a7a06d..e942c4ccca 100644 --- a/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java +++ b/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java @@ -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 { diff --git a/applications/party/src/main/java/org/apache/ofbiz/party/communication/CommunicationEventServices.java b/applications/party/src/main/java/org/apache/ofbiz/party/communication/CommunicationEventServices.java index 19131bcce2..7ea38010bf 100644 --- a/applications/party/src/main/java/org/apache/ofbiz/party/communication/CommunicationEventServices.java +++ b/applications/party/src/main/java/org/apache/ofbiz/party/communication/CommunicationEventServices.java @@ -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") diff --git a/framework/base/src/main/java/org/apache/ofbiz/base/util/SSLUtil.java b/framework/base/src/main/java/org/apache/ofbiz/base/util/SSLUtil.java index a1083215fe..a5c7c9dfa8 100644 --- a/framework/base/src/main/java/org/apache/ofbiz/base/util/SSLUtil.java +++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/SSLUtil.java @@ -133,10 +133,11 @@ public final class SSLUtil { if (ks != null) { List 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()); } diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelReader.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelReader.java index 9a52444880..ac00db0a1e 100644 --- a/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelReader.java +++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelReader.java @@ -179,11 +179,13 @@ public class ModelReader implements Serializable { 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 " + diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/JNDITransactionFactory.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/JNDITransactionFactory.java index e2a912105d..d0ec1fe8f3 100644 --- a/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/JNDITransactionFactory.java +++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/JNDITransactionFactory.java @@ -175,7 +175,7 @@ public class JNDITransactionFactory implements TransactionFactory { 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); diff --git a/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/callops/CallSimpleMethod.java b/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/callops/CallSimpleMethod.java index 64f5ce0642..5867ffb345 100644 --- a/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/callops/CallSimpleMethod.java +++ b/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/callops/CallSimpleMethod.java @@ -110,8 +110,9 @@ public final class CallSimpleMethod extends MethodOperation { 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()); diff --git a/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/Iterate.java b/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/Iterate.java index ebe9215294..c62bffc85f 100644 --- a/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/Iterate.java +++ b/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/Iterate.java @@ -68,8 +68,9 @@ public final class Iterate extends MethodOperation { @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 MethodOperation { } else if (objList instanceof Collection) { Collection 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 MethodOperation { } else if (objList instanceof Iterator) { Iterator 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()) { diff --git a/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/IterateMap.java b/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/IterateMap.java index 879ebce67a..b80ede3ff9 100644 --- a/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/IterateMap.java +++ b/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/IterateMap.java @@ -70,22 +70,26 @@ public final class IterateMap extends MethodOperation { 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 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 theEntry : theMap.entrySet()) { diff --git a/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/SetOperation.java b/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/SetOperation.java index a73f5c0c8f..16c91759f4 100644 --- a/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/SetOperation.java +++ b/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/SetOperation.java @@ -144,8 +144,9 @@ public final class SetOperation extends MethodOperation { } } 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 MethodOperation { 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 MethodOperation { } } } - 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; } diff --git a/framework/service/src/main/java/org/apache/ofbiz/service/group/GroupModel.java b/framework/service/src/main/java/org/apache/ofbiz/service/group/GroupModel.java index c4fe65e509..a7413c50af 100644 --- a/framework/service/src/main/java/org/apache/ofbiz/service/group/GroupModel.java +++ b/framework/service/src/main/java/org/apache/ofbiz/service/group/GroupModel.java @@ -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 runContext = UtilMisc.makeMapWritable(context); Map result = new HashMap(); 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 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)) { diff --git a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java index 1ba1d61461..a98f983cd5 100644 --- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java +++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java @@ -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); diff --git a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlServlet.java b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlServlet.java index 342b317c3e..d552473234 100644 --- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlServlet.java +++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlServlet.java @@ -140,8 +140,9 @@ public class ControlServlet extends HttpServlet { 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 diff --git a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizUrlTransform.java b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizUrlTransform.java index 537d2b994b..e64810aafd 100644 --- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizUrlTransform.java +++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizUrlTransform.java @@ -74,8 +74,9 @@ public class OfbizUrlTransform implements TemplateTransformModel { 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 { diff --git a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelAction.java b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelAction.java index 6fcd0a1dd4..4fdf9e7749 100644 --- a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelAction.java +++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelAction.java @@ -135,8 +135,9 @@ public abstract class AbstractModelAction implements Serializable, ModelAction { 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 AbstractModelAction implements Serializable, ModelAction { 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 AbstractModelAction implements Serializable, ModelAction { 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 AbstractModelAction implements Serializable, ModelAction { 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 AbstractModelAction implements Serializable, ModelAction { 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 currentWidgetTrail = UtilGenerics.toList(context.get("_WIDGETTRAIL_")); @@ -889,14 +891,15 @@ public abstract class AbstractModelAction implements Serializable, ModelAction { 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); } } diff --git a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTreeAction.java b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTreeAction.java index 8104cdfba1..a458a35371 100644 --- a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTreeAction.java +++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTreeAction.java @@ -108,15 +108,17 @@ public abstract class ModelTreeAction extends AbstractModelAction { 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(); } diff --git a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java index cf2ba6045f..2ba147c97b 100644 --- a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java +++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java @@ -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 tempFieldList = new LinkedList(); diff --git a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java index 2d6e6a2fd4..b0aa4cf9fb 100644 --- a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java +++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java @@ -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