Yuta HIGUCHI

NPE fix for ONOS-379

Change-Id: If928809b3f29c1e7e457c84ba229279137196b35
...@@ -364,11 +364,12 @@ public class HazelcastLinkResourceStore ...@@ -364,11 +364,12 @@ public class HazelcastLinkResourceStore
364 // concurrent allocation detected, retry transaction 364 // concurrent allocation detected, retry transaction
365 throw new TransactionException("Concurrent Allocation, retry"); 365 throw new TransactionException("Concurrent Allocation, retry");
366 } 366 }
367 + } else {
368 + List<LinkResourceAllocations> after = new ArrayList<>(before.size() + 1);
369 + after.addAll(before);
370 + after.add(allocations);
371 + linkAllocs.replace(linkKey, before, after);
367 } 372 }
368 - List<LinkResourceAllocations> after = new ArrayList<>(before.size() + 1);
369 - after.addAll(before);
370 - after.add(allocations);
371 - linkAllocs.replace(linkKey, before, after);
372 } 373 }
373 374
374 @Override 375 @Override
......