Committed by
Ray Milkey
Refactor: Remove null check
This is safe because getResourceCapacity(ResourceType, Link) never returns null Change-Id: Iabca2ef2dc933b4f2c0578bc4f9fb10848e1df1c
Showing
1 changed file
with
0 additions
and
2 deletions
| ... | @@ -199,10 +199,8 @@ public class ConsistentLinkResourceStore extends | ... | @@ -199,10 +199,8 @@ public class ConsistentLinkResourceStore extends |
| 199 | Map<ResourceType, Set<? extends ResourceAllocation>> caps = new HashMap<>(); | 199 | Map<ResourceType, Set<? extends ResourceAllocation>> caps = new HashMap<>(); |
| 200 | for (ResourceType type : ResourceType.values()) { | 200 | for (ResourceType type : ResourceType.values()) { |
| 201 | Set<? extends ResourceAllocation> cap = getResourceCapacity(type, link); | 201 | Set<? extends ResourceAllocation> cap = getResourceCapacity(type, link); |
| 202 | - if (cap != null) { | ||
| 203 | caps.put(type, cap); | 202 | caps.put(type, cap); |
| 204 | } | 203 | } |
| 205 | - } | ||
| 206 | return caps; | 204 | return caps; |
| 207 | } | 205 | } |
| 208 | 206 | ... | ... |
-
Please register or login to post a comment