Committed by
Gerrit Code Review
Refactor: Inline method
Change-Id: Ic48aaed07f80156801e0136e9d34ec824a9219d6
Showing
1 changed file
with
2 additions
and
13 deletions
| ... | @@ -289,18 +289,6 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu | ... | @@ -289,18 +289,6 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu |
| 289 | return mapping.size() < maxCapacity; | 289 | return mapping.size() < maxCapacity; |
| 290 | } | 290 | } |
| 291 | 291 | ||
| 292 | - private boolean isAllowed(OpticalCircuitIntent circuitIntent, OpticalConnectivityIntent connIntent) { | ||
| 293 | - if (!isAllowed(circuitIntent.getSrc(), connIntent.getSrc())) { | ||
| 294 | - return false; | ||
| 295 | - } | ||
| 296 | - | ||
| 297 | - if (!isAllowed(circuitIntent.getDst(), connIntent.getDst())) { | ||
| 298 | - return false; | ||
| 299 | - } | ||
| 300 | - | ||
| 301 | - return true; | ||
| 302 | - } | ||
| 303 | - | ||
| 304 | private boolean isAllowed(ConnectPoint circuitCp, ConnectPoint connectivityCp) { | 292 | private boolean isAllowed(ConnectPoint circuitCp, ConnectPoint connectivityCp) { |
| 305 | ConnectPoint srcStaticPort = staticPort(circuitCp); | 293 | ConnectPoint srcStaticPort = staticPort(circuitCp); |
| 306 | if (srcStaticPort != null) { | 294 | if (srcStaticPort != null) { |
| ... | @@ -338,7 +326,8 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu | ... | @@ -338,7 +326,8 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu |
| 338 | continue; | 326 | continue; |
| 339 | } | 327 | } |
| 340 | 328 | ||
| 341 | - if (!isAllowed(circuitIntent, connIntent)) { | 329 | + if (!(isAllowed(circuitIntent.getSrc(), connIntent.getSrc()) && |
| 330 | + isAllowed(circuitIntent.getDst(), connIntent.getDst()))) { | ||
| 342 | continue; | 331 | continue; |
| 343 | } | 332 | } |
| 344 | 333 | ... | ... |
-
Please register or login to post a comment