Modified code to explicitly check for missing drools object, and
to not throw an exception during MDC setup.
Change-Id: Iac16f2fc46e2ffff03195985383b09b814fa4008
Issue-ID: POLICY-1082
Signed-off-by: Jim Hahn <jrh3@att.com>
throw makeArgEx(name);
}
- if (droolsConfig == null)
- throw new IllegalArgumentException("Invalid Drools Configuration");
-
PolicyController controller = this.get(name);
if (controller == null) {
if (controller == null)
throw new IllegalArgumentException("Not a valid controller: null");
+ if (droolsConfig == null)
+ throw new IllegalArgumentException("Invalid Drools Configuration");
+
if (!controller.updateDrools(droolsConfig)) {
logger.warn("Cannot update drools configuration: " + droolsConfig + " on " + this);
throw new IllegalArgumentException("Cannot update drools configuration Drools Configuration");
for (final ControllerConfiguration configController : configControllers) {
MDCTransaction mdcTrans = MDCTransaction.newSubTransaction(null).setTargetEntity(configController.getName())
.setTargetServiceName(configController.getOperation())
- .setTargetVirtualEntity(configController.getDrools().toString());
+ .setTargetVirtualEntity(""+configController.getDrools());
try {
final PolicyController policyController = this.updatePolicyController(configController);
policyControllers.add(policyController);