commit | 860bb539411ad556f74da023a8aac989556872d6 | [log] [tgz] |
---|---|---|
author | Sho SHIMIZU <sshimizu@us.fujitsu.com> | Fri May 13 13:09:50 2016 -0700 |
committer | Sho SHIMIZU <sshimizu@us.fujitsu.com> | Fri May 13 13:09:50 2016 -0700 |
tree | 6eb25d9b3efbecc298871c284e2a56189ada8888 | |
parent | a7e3277817589b25179d25a538788aec8043833e [diff] |
Refactor: Simplify if-statement Change-Id: I869b6a6e9f85422262dd7dbd3884534dcc7affb0
diff --git a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/TransactionalContinuousResourceStore.java b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/TransactionalContinuousResourceStore.java index 4aed64d..548d221 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/TransactionalContinuousResourceStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/TransactionalContinuousResourceStore.java
@@ -191,11 +191,7 @@ ImmutableList<ResourceAllocation> finalAllocations = Stream.concat(nonMatched.stream(), matched.stream()).collect(GuavaCollectors.toImmutableList()); - if (!consumers.replace(resource.id(), oldAllocation, - new ContinuousResourceAllocation(oldAllocation.original(), finalAllocations))) { - return false; - } - - return true; + return consumers.replace(resource.id(), oldAllocation, + new ContinuousResourceAllocation(oldAllocation.original(), finalAllocations)); } }