commit | 3c48de0f3b659afbe2d94876717b8eeb47f8b677 | [log] [tgz] |
---|---|---|
author | Madan Jampani <madan@onlab.us> | Wed Aug 26 13:28:15 2015 -0700 |
committer | Gerrit Code Review <gerrit@onlab.us> | Wed Aug 26 21:11:29 2015 +0000 |
tree | 2bb24c6fba2cd8f7da6833c1bfca4e91f00424e0 | |
parent | 216d8d7a8fff06187501c35758a6a66b7bf8a1ea [diff] |
Ensure UpdateEntry comprison works well with ECMaps that have tombstones disabled Change-Id: Iff3f09a8342a7d9e89a31fb2be86ca1bfa4d75ff
diff --git a/core/store/dist/src/main/java/org/onosproject/store/ecmap/UpdateEntry.java b/core/store/dist/src/main/java/org/onosproject/store/ecmap/UpdateEntry.java index 2a607bb..53683b9 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/ecmap/UpdateEntry.java +++ b/core/store/dist/src/main/java/org/onosproject/store/ecmap/UpdateEntry.java
@@ -61,7 +61,7 @@ * @return true if this entry is newer; false otherwise */ public boolean isNewerThan(UpdateEntry<K, V> other) { - return other == null || value.isNewerThan(other.value); + return other == null || other.value == null || (value != null && value.isNewerThan(other.value)); } @Override