summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaka Cho <takamune.cho@att.com>2020-06-26 11:47:18 -0400
committerLiam Fallon <liam.fallon@est.tech>2020-06-29 10:43:36 +0000
commit5814190df5c082e5b681baf336f9e45ba88c3658 (patch)
tree50638bfc0234769f5d24388141ff7a023f10c406
parentf6d0b829522c694d0d33b9d8d4c7f22dcad78dde (diff)
controlloop m2 sonar fix
- remove some unused statement - remove unnecessary check Issue-ID: POLICY-2616 Change-Id: Ieb2c898a3c6ad7210642aef990b43c9a01fc15b3 Signed-off-by: Taka Cho <takamune.cho@att.com>
-rw-r--r--controlloop/m2/util/src/main/java/org/onap/policy/util/DroolsSessionCommonSerializable.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/controlloop/m2/util/src/main/java/org/onap/policy/util/DroolsSessionCommonSerializable.java b/controlloop/m2/util/src/main/java/org/onap/policy/util/DroolsSessionCommonSerializable.java
index 0834026a0..c76a8c244 100644
--- a/controlloop/m2/util/src/main/java/org/onap/policy/util/DroolsSessionCommonSerializable.java
+++ b/controlloop/m2/util/src/main/java/org/onap/policy/util/DroolsSessionCommonSerializable.java
@@ -108,14 +108,13 @@ public class DroolsSessionCommonSerializable implements Serializable {
if (session != null) {
// we found the 'PolicySession' -- now, look for the adjunct
Object adj = session.getAdjunct(Adjunct.class);
- if (adj == null || !(adj instanceof Adjunct)) {
+ if (!(adj instanceof Adjunct)) {
// adjunct does not exist, or has the wrong type -- create it
adjunct = new Adjunct();
session.setAdjunct(Adjunct.class, adjunct);
} else {
// found the adjunct -- return it
adjunct = (Adjunct) adj;
- //adjunct = Adjunct.class.cast(adj);
}
}
return adjunct;