NPE fix for ONOS-379
Change-Id: If928809b3f29c1e7e457c84ba229279137196b35
Showing
1 changed file
with
2 additions
and
1 deletions
... | @@ -364,12 +364,13 @@ public class HazelcastLinkResourceStore | ... | @@ -364,12 +364,13 @@ 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 | - } | 367 | + } else { |
368 | List<LinkResourceAllocations> after = new ArrayList<>(before.size() + 1); | 368 | List<LinkResourceAllocations> after = new ArrayList<>(before.size() + 1); |
369 | after.addAll(before); | 369 | after.addAll(before); |
370 | after.add(allocations); | 370 | after.add(allocations); |
371 | linkAllocs.replace(linkKey, before, after); | 371 | linkAllocs.replace(linkKey, before, after); |
372 | } | 372 | } |
373 | + } | ||
373 | 374 | ||
374 | @Override | 375 | @Override |
375 | public LinkResourceEvent releaseResources(LinkResourceAllocations allocations) { | 376 | public LinkResourceEvent releaseResources(LinkResourceAllocations allocations) { | ... | ... |
-
Please register or login to post a comment