Remove a conditional branch that is not meaningful
The isolation level of TransactionalMap is repeatable read. Read values
for the same key don't change during a transaction. The removed
branch is never executed because the variable "before" is null.
Change-Id: I5cd1f7a488e3585d5a1e92dd5b50d52261edf415
diff --git a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentLinkResourceStore.java b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentLinkResourceStore.java
index d51ddd0..11137aa 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentLinkResourceStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentLinkResourceStore.java
@@ -361,12 +361,7 @@
if (before == null) {
List<LinkResourceAllocations> after = new ArrayList<>();
after.add(allocations);
- before = linkAllocs.putIfAbsent(linkKey, after);
- if (before != null) {
- // concurrent allocation detected, retry transaction : is this needed?
- log.warn("Concurrent Allocation, retrying");
- throw new TransactionException();
- }
+ linkAllocs.putIfAbsent(linkKey, after);
} else {
List<LinkResourceAllocations> after = new ArrayList<>(before.size() + 1);
after.addAll(before);