commit | 38bcfcfd35d7a77bcf18159edb8f800d773f3c41 | [log] [tgz] |
---|---|---|
author | Sho SHIMIZU <sshimizu@us.fujitsu.com> | Fri May 13 15:48:54 2016 -0700 |
committer | Sho SHIMIZU <sshimizu@us.fujitsu.com> | Fri May 13 15:48:54 2016 -0700 |
tree | 206b22c9582f44595938b8d63cf823609ba6bfdb | |
parent | dffe3b808f4f858ab5493a68480f59c84948e1c3 [diff] [blame] |
Stop passing duplicate original continuous resource Change-Id: I3608b1cd362cca5e3c0534b6dfb18a7204c42aef
diff --git a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ContinuousResourceAllocation.java b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ContinuousResourceAllocation.java index 13446b0..f9e22dd 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ContinuousResourceAllocation.java +++ b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ContinuousResourceAllocation.java
@@ -44,12 +44,11 @@ * Checks if there is enough resource volume to allocated the requested resource * against the specified resource. * - * @param original original resource * @param request requested resource * @return true if there is enough resource volume. Otherwise, false. */ // computational complexity: O(n) where n is the number of allocations - boolean hasEnoughResource(ContinuousResource original, ContinuousResource request) { + boolean hasEnoughResource(ContinuousResource request) { double allocated = allocations.stream() .filter(x -> x.resource() instanceof ContinuousResource) .map(x -> (ContinuousResource) x.resource())