commit | f1240a9984392d7a214bef9f9700281f791467db | [log] [tgz] |
---|---|---|
author | Jordan Halterman <jordan.halterman@gmail.com> | Thu Mar 07 15:52:34 2019 -0800 |
committer | Jordan Halterman <jordan@opennetworking.org> | Thu Mar 07 22:17:55 2019 -0800 |
tree | 78d08038c04f88271138afcb2d78deceb02b474f | |
parent | 3bfbd38274af5640879e0db567f924cc1d552e9b [diff] |
Fix NPE in flow store Change-Id: If240d2f02c96b3f03398b8ec30a7feb7bb9240b4
diff --git a/core/store/dist/src/main/java/org/onosproject/store/flow/impl/DeviceFlowTable.java b/core/store/dist/src/main/java/org/onosproject/store/flow/impl/DeviceFlowTable.java index 6154768..ed5430c 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/flow/impl/DeviceFlowTable.java +++ b/core/store/dist/src/main/java/org/onosproject/store/flow/impl/DeviceFlowTable.java
@@ -761,7 +761,8 @@ * Handles an update to a term. */ private void updateTerm(DeviceReplicaInfo replicaInfo) { - if (replicaInfo.term() == this.replicaInfo.term()) { + DeviceReplicaInfo oldReplicaInfo = this.replicaInfo; + if (oldReplicaInfo != null && replicaInfo.term() == oldReplicaInfo.term()) { this.replicaInfo = replicaInfo; // If the local node is neither the master or a backup for the device *and the term is active*,