aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--policy-core/src/main/java/org/openecomp/policy/drools/core/PolicyContainer.java6
-rw-r--r--policy-core/src/main/java/org/openecomp/policy/drools/core/PolicySession.java2
-rw-r--r--policy-management/src/main/java/org/openecomp/policy/drools/protocol/coders/JsonProtocolFilter.java2
-rw-r--r--policy-management/src/main/java/org/openecomp/policy/drools/protocol/coders/ProtocolCoderToolset.java7
4 files changed, 10 insertions, 7 deletions
diff --git a/policy-core/src/main/java/org/openecomp/policy/drools/core/PolicyContainer.java b/policy-core/src/main/java/org/openecomp/policy/drools/core/PolicyContainer.java
index 34988d32..65bd5470 100644
--- a/policy-core/src/main/java/org/openecomp/policy/drools/core/PolicyContainer.java
+++ b/policy-core/src/main/java/org/openecomp/policy/drools/core/PolicyContainer.java
@@ -352,8 +352,14 @@ public class PolicyContainer implements Startable
if(name == null){
logger.warn("adoptKieSession:input name is null");
+ throw(new IllegalArgumentException
+ ("KieSession input name is null "
+ + getName()));
}else if(kieSession == null){
logger.warn("adoptKieSession:input kieSession is null");
+ throw(new IllegalArgumentException
+ ("KieSession '" + name + "' is null "
+ + getName()));
}else {
logger.info("adoptKieSession:name: " + name + " kieSession: " + kieSession);
}
diff --git a/policy-core/src/main/java/org/openecomp/policy/drools/core/PolicySession.java b/policy-core/src/main/java/org/openecomp/policy/drools/core/PolicySession.java
index 4eb088c5..431d166d 100644
--- a/policy-core/src/main/java/org/openecomp/policy/drools/core/PolicySession.java
+++ b/policy-core/src/main/java/org/openecomp/policy/drools/core/PolicySession.java
@@ -565,7 +565,7 @@ public class PolicySession
// if we fall through, it means 'KieSession.halt()' was called,
// but this may be a result of 'KieScanner' doing an update
}
- catch (Throwable e)
+ catch (Exception | LinkageError e)
{
logger.error("startThread error in kieSession.fireUntilHalt", e);
}
diff --git a/policy-management/src/main/java/org/openecomp/policy/drools/protocol/coders/JsonProtocolFilter.java b/policy-management/src/main/java/org/openecomp/policy/drools/protocol/coders/JsonProtocolFilter.java
index d6146a30..7831e7b8 100644
--- a/policy-management/src/main/java/org/openecomp/policy/drools/protocol/coders/JsonProtocolFilter.java
+++ b/policy-management/src/main/java/org/openecomp/policy/drools/protocol/coders/JsonProtocolFilter.java
@@ -189,7 +189,7 @@ public class JsonProtocolFilter {
}
try {
- if (json == null || !json.isJsonObject()) {
+ if (!json.isJsonObject()) {
return false;
}
diff --git a/policy-management/src/main/java/org/openecomp/policy/drools/protocol/coders/ProtocolCoderToolset.java b/policy-management/src/main/java/org/openecomp/policy/drools/protocol/coders/ProtocolCoderToolset.java
index fb3f95d3..bf7a43f3 100644
--- a/policy-management/src/main/java/org/openecomp/policy/drools/protocol/coders/ProtocolCoderToolset.java
+++ b/policy-management/src/main/java/org/openecomp/policy/drools/protocol/coders/ProtocolCoderToolset.java
@@ -642,13 +642,10 @@ class GsonProtocolCoderToolset extends ProtocolCoderToolset {
throws IllegalArgumentException, UnsupportedOperationException {
DroolsController droolsController =
- DroolsController.factory.get(groupId, artifactId, "");
+ DroolsController.factory.get(groupId, artifactId, null);
if (droolsController == null) {
logger.info("{}: no drools-controller to process {} (continue)", this, event);
- if (this.customCoder != null) {
- logger.warn("{}: no drools-controller to process {}", this, event);
- throw new IllegalStateException("custom-coder but no drools-controller");
- }
+ throw new IllegalStateException("custom-coder but no drools-controller");
}
if (this.customCoder != null) {