diff options
Diffstat (limited to 'policy-management/src/main/java/org/onap/policy/drools/system/PolicyControllerFactory.java')
-rw-r--r-- | policy-management/src/main/java/org/onap/policy/drools/system/PolicyControllerFactory.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyControllerFactory.java b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyControllerFactory.java index e2af0fbc..d8d4289f 100644 --- a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyControllerFactory.java +++ b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyControllerFactory.java @@ -241,9 +241,6 @@ class IndexedPolicyControllerFactory implements PolicyControllerFactory { throw makeArgEx(name); } - if (droolsConfig == null) - throw new IllegalArgumentException("Invalid Drools Configuration"); - PolicyController controller = this.get(name); if (controller == null) { @@ -271,6 +268,9 @@ class IndexedPolicyControllerFactory implements PolicyControllerFactory { 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"); |