diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2019-07-25 13:06:20 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-07-25 13:06:20 +0000 |
commit | ce1121d3cbe7e7706c1cd3f653436a7bdc07c2bb (patch) | |
tree | e835b767798bb96319d94c546997f176d4c6e4d3 /policy-management | |
parent | 3f0f00395ebcfa9fd37765efddb82573588d1263 (diff) | |
parent | 7602a4380488d872b25cd718176b23369bf9e472 (diff) |
Merge "Add coverage to feature-active-standby-management"
Diffstat (limited to 'policy-management')
-rw-r--r-- | policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java | 42 |
1 files changed, 11 insertions, 31 deletions
diff --git a/policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java b/policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java index d0b98450..818cae80 100644 --- a/policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java +++ b/policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java @@ -218,9 +218,7 @@ public class MavenDroolsController implements DroolsController { /* upgrade */ String messages = this.policyContainer.updateToVersion(newVersion); - if (logger.isWarnEnabled()) { - logger.warn("{} UPGRADE results: {}", this, messages); - } + logger.warn("{} UPGRADE results: {}", this, messages); /* * If all sucessful (can load new container), now we can remove all coders from previous sessions @@ -232,9 +230,7 @@ public class MavenDroolsController implements DroolsController { */ this.init(decoderConfigurations, encoderConfigurations); - if (logger.isInfoEnabled()) { - logger.info("UPDATE-TO-VERSION: completed " + this); - } + logger.info("UPDATE-TO-VERSION: completed {}", this); } /** @@ -247,9 +243,7 @@ public class MavenDroolsController implements DroolsController { protected void initCoders(List<TopicCoderFilterConfiguration> coderConfigurations, boolean decoder) { - if (logger.isInfoEnabled()) { - logger.info("INIT-CODERS: " + this); - } + logger.info("INIT-CODERS: {}", this); if (coderConfigurations == null) { return; @@ -337,9 +331,7 @@ public class MavenDroolsController implements DroolsController { * remove decoders. */ protected void removeDecoders() { - if (logger.isInfoEnabled()) { - logger.info("REMOVE-DECODERS: {}", this); - } + logger.info("REMOVE-DECODERS: {}", this); if (this.decoderConfigurations == null) { return; @@ -357,9 +349,7 @@ public class MavenDroolsController implements DroolsController { */ protected void removeEncoders() { - if (logger.isInfoEnabled()) { - logger.info("REMOVE-ENCODERS: {}", this); - } + logger.info("REMOVE-ENCODERS: {}", this); if (this.encoderConfigurations == null) { return; @@ -380,18 +370,12 @@ public class MavenDroolsController implements DroolsController { } if (modelHash == this.modelClassLoaderHash) { - if (logger.isInfoEnabled()) { - logger.info(coderClass.getName() - + this + " class loader matches original drools controller rules classloader " - + coderClass.getClassLoader()); - } + logger.info("{}{} class loader matches original drools controller rules classloader {}", + coderClass.getName(), this, coderClass.getClassLoader()); return true; } else { - if (logger.isWarnEnabled()) { - logger.warn(this + coderClass.getName() + " class loaders don't match " - + coderClass.getClassLoader() + " vs " - + this.policyContainer.getClassLoader()); - } + logger.warn("{}{} class loaders don't match {} vs {}", this, coderClass.getName(), + coderClass.getClassLoader(), this.policyContainer.getClassLoader()); return false; } } @@ -399,9 +383,7 @@ public class MavenDroolsController implements DroolsController { @Override public boolean start() { - if (logger.isInfoEnabled()) { - logger.info("START: {}", this); - } + logger.info("START: {}", this); synchronized (this) { if (this.alive) { @@ -572,9 +554,7 @@ public class MavenDroolsController implements DroolsController { @Override public boolean deliver(TopicSink sink, Object event) { - if (logger.isInfoEnabled()) { - logger.info("{}DELIVER: {} FROM {} TO {}", this, event, this, sink); - } + logger.info("{}DELIVER: {} FROM {} TO {}", this, event, this, sink); for (DroolsControllerFeatureApi feature : DroolsControllerFeatureApi.providers.getList()) { try { |