Committed by
Gerrit Code Review
Remove branch condition which is always true
Change-Id: I27385061986f7b43f78365278fa763c70a451b46
Showing
1 changed file
with
0 additions
and
4 deletions
... | @@ -191,7 +191,6 @@ public class VirtualPortManager implements VirtualPortService { | ... | @@ -191,7 +191,6 @@ public class VirtualPortManager implements VirtualPortService { |
191 | @Override | 191 | @Override |
192 | public boolean updatePorts(Iterable<VirtualPort> vPorts) { | 192 | public boolean updatePorts(Iterable<VirtualPort> vPorts) { |
193 | checkNotNull(vPorts, VIRTUALPORT_NOT_NULL); | 193 | checkNotNull(vPorts, VIRTUALPORT_NOT_NULL); |
194 | - if (vPorts != null) { | ||
195 | for (VirtualPort vPort : vPorts) { | 194 | for (VirtualPort vPort : vPorts) { |
196 | vPortStore.put(vPort.portId(), vPort); | 195 | vPortStore.put(vPort.portId(), vPort); |
197 | if (!vPortStore.containsKey(vPort.portId())) { | 196 | if (!vPortStore.containsKey(vPort.portId())) { |
... | @@ -208,14 +207,12 @@ public class VirtualPortManager implements VirtualPortService { | ... | @@ -208,14 +207,12 @@ public class VirtualPortManager implements VirtualPortService { |
208 | return false; | 207 | return false; |
209 | } | 208 | } |
210 | } | 209 | } |
211 | - } | ||
212 | return true; | 210 | return true; |
213 | } | 211 | } |
214 | 212 | ||
215 | @Override | 213 | @Override |
216 | public boolean removePorts(Iterable<VirtualPortId> vPortIds) { | 214 | public boolean removePorts(Iterable<VirtualPortId> vPortIds) { |
217 | checkNotNull(vPortIds, VIRTUALPORT_ID_NULL); | 215 | checkNotNull(vPortIds, VIRTUALPORT_ID_NULL); |
218 | - if (vPortIds != null) { | ||
219 | for (VirtualPortId vPortId : vPortIds) { | 216 | for (VirtualPortId vPortId : vPortIds) { |
220 | vPortStore.remove(vPortId); | 217 | vPortStore.remove(vPortId); |
221 | if (vPortStore.containsKey(vPortId)) { | 218 | if (vPortStore.containsKey(vPortId)) { |
... | @@ -224,7 +221,6 @@ public class VirtualPortManager implements VirtualPortService { | ... | @@ -224,7 +221,6 @@ public class VirtualPortManager implements VirtualPortService { |
224 | return false; | 221 | return false; |
225 | } | 222 | } |
226 | } | 223 | } |
227 | - } | ||
228 | return true; | 224 | return true; |
229 | } | 225 | } |
230 | 226 | ... | ... |
-
Please register or login to post a comment