Sho SHIMIZU
Committed by Gerrit Code Review

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
......@@ -361,12 +361,7 @@ public class ConsistentLinkResourceStore extends
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);
......