Committed by
Gerrit Code Review
Duplicate Null Check not required
Change-Id: I9b150ad11572cd44b540e5b1a893b3c7a8953c30
Showing
1 changed file
with
0 additions
and
4 deletions
| ... | @@ -154,7 +154,6 @@ public class RouterManager implements RouterService { | ... | @@ -154,7 +154,6 @@ public class RouterManager implements RouterService { |
| 154 | @Override | 154 | @Override |
| 155 | public boolean updateRouters(Collection<Router> routers) { | 155 | public boolean updateRouters(Collection<Router> routers) { |
| 156 | checkNotNull(routers, ROUTER_NOT_NULL); | 156 | checkNotNull(routers, ROUTER_NOT_NULL); |
| 157 | - if (routers != null) { | ||
| 158 | for (Router router : routers) { | 157 | for (Router router : routers) { |
| 159 | if (!routerStore.containsKey(router.id())) { | 158 | if (!routerStore.containsKey(router.id())) { |
| 160 | log.debug("The routers is not exist whose identifier is {}", | 159 | log.debug("The routers is not exist whose identifier is {}", |
| ... | @@ -170,14 +169,12 @@ public class RouterManager implements RouterService { | ... | @@ -170,14 +169,12 @@ public class RouterManager implements RouterService { |
| 170 | return false; | 169 | return false; |
| 171 | } | 170 | } |
| 172 | } | 171 | } |
| 173 | - } | ||
| 174 | return true; | 172 | return true; |
| 175 | } | 173 | } |
| 176 | 174 | ||
| 177 | @Override | 175 | @Override |
| 178 | public boolean removeRouters(Collection<RouterId> routerIds) { | 176 | public boolean removeRouters(Collection<RouterId> routerIds) { |
| 179 | checkNotNull(routerIds, ROUTER_ID_NULL); | 177 | checkNotNull(routerIds, ROUTER_ID_NULL); |
| 180 | - if (routerIds != null) { | ||
| 181 | for (RouterId routerId : routerIds) { | 178 | for (RouterId routerId : routerIds) { |
| 182 | if (!routerStore.containsKey(routerId)) { | 179 | if (!routerStore.containsKey(routerId)) { |
| 183 | log.debug("The router is not exist whose identifier is {}", | 180 | log.debug("The router is not exist whose identifier is {}", |
| ... | @@ -193,7 +190,6 @@ public class RouterManager implements RouterService { | ... | @@ -193,7 +190,6 @@ public class RouterManager implements RouterService { |
| 193 | return false; | 190 | return false; |
| 194 | } | 191 | } |
| 195 | } | 192 | } |
| 196 | - } | ||
| 197 | return true; | 193 | return true; |
| 198 | } | 194 | } |
| 199 | 195 | ... | ... |
-
Please register or login to post a comment