diff options
author | liamfallon <liam.fallon@est.tech> | 2019-10-14 14:25:58 +0100 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2019-10-14 16:36:47 +0100 |
commit | e940ccf7d38373c145b5d5f4a95603edaa089796 (patch) | |
tree | b762cf9aeb4fcee6f79cfe8fbb81a70722d51378 /models-sim/policy-models-sim-pdp/src/main/java | |
parent | ccebb3497292cfa831ad7cdc7ee7739a0d94a70c (diff) |
Clean up minor things in policy-models
Cleam up of some minor eclipse, checkstyle, and Sonar issues in
policy-models
Issue-ID: POLICY-2165
Change-Id: Id5682fd60e1a6cebbf716d9c258453aa53ca2482
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'models-sim/policy-models-sim-pdp/src/main/java')
-rw-r--r-- | models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/handler/PdpUpdateMessageHandler.java | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/handler/PdpUpdateMessageHandler.java b/models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/handler/PdpUpdateMessageHandler.java index 4f33d079f..5b77f4704 100644 --- a/models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/handler/PdpUpdateMessageHandler.java +++ b/models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/handler/PdpUpdateMessageHandler.java @@ -91,12 +91,18 @@ public class PdpUpdateMessageHandler { * @return boolean flag which tells if the information is same or not */ private boolean checkIfAlreadyHandled(final PdpUpdate pdpUpdateMsg, final PdpStatus pdpStatusContext) { - return null != pdpStatusContext.getPdpGroup() - && pdpStatusContext.getPdpGroup().equals(pdpUpdateMsg.getPdpGroup()) - && null != pdpStatusContext.getPdpSubgroup() - && pdpStatusContext.getPdpSubgroup().equals(pdpUpdateMsg.getPdpSubgroup()) - && null != pdpStatusContext.getPolicies() && new PdpMessageHandler() - .getToscaPolicyIdentifiers(pdpUpdateMsg.getPolicies()).equals(pdpStatusContext.getPolicies()); + if (pdpStatusContext.getPdpGroup() == null + || !pdpStatusContext.getPdpGroup().equals(pdpUpdateMsg.getPdpGroup())) { + return false; + } + + if (pdpStatusContext.getPdpSubgroup() == null + || !pdpStatusContext.getPdpSubgroup().equals(pdpUpdateMsg.getPdpSubgroup())) { + return false; + } + + return null != pdpStatusContext.getPolicies() && new PdpMessageHandler() + .getToscaPolicyIdentifiers(pdpUpdateMsg.getPolicies()).equals(pdpStatusContext.getPolicies()); } /** |