aboutsummaryrefslogtreecommitdiffstats
path: root/policy-core
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2017-07-21 08:43:43 -0500
committerJorge Hernandez <jh1730@att.com>2017-07-21 08:43:43 -0500
commit1ad88d1ce542a10fb57d1205ac10c8882d103723 (patch)
tree943200ef955c88a44c2671d5e8712c3a13b1cf45 /policy-core
parent76ec9035351877aa5993bbefef63fcc73941d2f2 (diff)
[POLICY-8] clean pdp-d from sonar blockers
Change-Id: I25427a0505e2fdd2b0b939f652452cb4f9f07f02 Signed-off-by: Jorge Hernandez <jh1730@att.com>
Diffstat (limited to 'policy-core')
-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
2 files changed, 7 insertions, 1 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);
}