commit | fd4f8d3861edf824fdef7d542b96d880e0a4f120 | [log] [tgz] |
---|---|---|
author | Ray Milkey <ray@opennetworking.org> | Wed Jan 17 15:24:52 2018 -0800 |
committer | Ray Milkey <ray@opennetworking.org> | Thu Jan 25 23:21:50 2018 +0000 |
tree | ec6add779a704e23bb49118db22c5594e7c58797 | |
parent | 5a45bbc7c376081d7084c611535ec8f25216cbeb [diff] [blame] |
Sonar suggestions - fixes to potential null pointer dereferences Change-Id: I4e350a9d72a9322971d5d4f831f1bdf167986b87
diff --git a/core/store/dist/src/main/java/org/onosproject/store/app/DistributedApplicationStore.java b/core/store/dist/src/main/java/org/onosproject/store/app/DistributedApplicationStore.java index d9e3bf3..fd6826a 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/app/DistributedApplicationStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/app/DistributedApplicationStore.java
@@ -464,6 +464,9 @@ ApplicationId appId = event.key(); InternalApplicationHolder newApp = event.newValue() == null ? null : event.newValue().value(); InternalApplicationHolder oldApp = event.oldValue() == null ? null : event.oldValue().value(); + if (newApp == null || oldApp == null) { + return; + } if (event.type() == MapEvent.Type.INSERT || event.type() == MapEvent.Type.UPDATE) { if (event.type() == MapEvent.Type.UPDATE && newApp.state() == oldApp.state()) { return;