Bug fix as per Jim's comment 88/85488/2
authora.sreekumar <ajith.sreekumar@est.tech>
Tue, 16 Apr 2019 15:32:46 +0000 (15:32 +0000)
committera.sreekumar <ajith.sreekumar@est.tech>
Tue, 16 Apr 2019 15:32:46 +0000 (15:32 +0000)
Changing the PdpUpdate already handled check back to previous code.

Change-Id: Icc195b5a8609fba8601dc151f62fdaf0c67b7be0
Issue-ID: POLICY-1632
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/PdpUpdateMessageHandler.java

index 599de86..31963dd 100644 (file)
@@ -138,17 +138,12 @@ public class PdpUpdateMessageHandler {
      * @return boolean flag which tells if the information is same or not
      */
     private boolean checkIfAlreadyHandled(final PdpUpdate pdpUpdateMsg, final PdpStatus pdpStatusContext) {
-
-        if (null != pdpStatusContext.getPdpGroup()
-                && pdpStatusContext.getPdpGroup().equals(pdpUpdateMsg.getPdpGroup())) {
-            return true;
-        } else if (null != pdpStatusContext.getPdpSubgroup()
-                && pdpStatusContext.getPdpSubgroup().equals(pdpUpdateMsg.getPdpSubgroup())) {
-            return true;
-        } else {
-            return null != pdpStatusContext.getPolicies() && new PdpMessageHandler()
-                    .getToscaPolicyIdentifiers(pdpUpdateMsg.getPolicies()).equals(pdpStatusContext.getPolicies());
-        }
+        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());
     }
 
     /**