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
@@ -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());
}