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.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818445 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jacques Le Roux
2017-12-16 19:00:19 +00:00
parent 1e9b5fea5c
commit d1bdee2c6c
18 changed files with 114 additions and 83 deletions
@@ -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 " +
@@ -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);