diff options
author | Jim Hahn <jrh3@att.com> | 2021-07-06 16:03:22 -0400 |
---|---|---|
committer | Ram Krishna Verma <ram_krishna.verma@bell.ca> | 2022-07-14 17:17:08 +0000 |
commit | 9f39a218087397e9fa619bc0dbec2122c2c44cb0 (patch) | |
tree | 45d09d2624f6ee6dc13e6ec6de4d93c6c9022506 /main/src/main/java/org | |
parent | 3f2d7fcd55d5722682aa7a96d7e808273f29ad5e (diff) |
Fix NPE in UpdateReq.reconfigure()
While running CSIT to test heartbeat changes with multiple PAPs,
observed an NPE in UpdateReq.reconfigure(). Modified the code to
always use deployment lists instead of null lists.
Issue-ID: POLICY-3460
Change-Id: I884e091817e88309330139a01d060e286bd42008
Signed-off-by: Jim Hahn <jrh3@att.com>
(cherry picked from commit a87b9d9e191b4dee5d821db55d1ff4fd70b8d73a)
Diffstat (limited to 'main/src/main/java/org')
-rw-r--r-- | main/src/main/java/org/onap/policy/pap/main/comm/msgdata/UpdateReq.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main/src/main/java/org/onap/policy/pap/main/comm/msgdata/UpdateReq.java b/main/src/main/java/org/onap/policy/pap/main/comm/msgdata/UpdateReq.java index 18ae5af6..74d7ad8a 100644 --- a/main/src/main/java/org/onap/policy/pap/main/comm/msgdata/UpdateReq.java +++ b/main/src/main/java/org/onap/policy/pap/main/comm/msgdata/UpdateReq.java @@ -122,6 +122,10 @@ public class UpdateReq extends RequestImpl { PdpUpdate update = (PdpUpdate) newMessage; + // ensure lists are never null + update.setPoliciesToBeDeployed(alwaysList(update.getPoliciesToBeDeployed())); + update.setPoliciesToBeUndeployed(alwaysList(update.getPoliciesToBeUndeployed())); + if (isSameContent(update)) { // content hasn't changed - nothing more to do return true; |