Committed by
Sho Shimizu
Refactor: Split into two if statements and inline variables
Change-Id: I2760c5d57272698307e96e3c3cc6d62467ca342a
Showing
1 changed file
with
8 additions
and
6 deletions
... | @@ -558,17 +558,19 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu | ... | @@ -558,17 +558,19 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu |
558 | } | 558 | } |
559 | 559 | ||
560 | private boolean isMultiplexingSupported(ConnectPoint src, ConnectPoint dst) { | 560 | private boolean isMultiplexingSupported(ConnectPoint src, ConnectPoint dst) { |
561 | - if (!isTributarySlotBehaviourSupported(src.deviceId()) || | 561 | + if (!isTributarySlotBehaviourSupported(src.deviceId())) { |
562 | - !isTributarySlotBehaviourSupported(dst.deviceId())) { | ||
563 | return false; | 562 | return false; |
564 | } | 563 | } |
565 | 564 | ||
566 | - ConnectPoint srcStaticPort = staticPort(src); | 565 | + if (!isTributarySlotBehaviourSupported(dst.deviceId())) { |
567 | - if (srcStaticPort != null) { | ||
568 | return false; | 566 | return false; |
569 | } | 567 | } |
570 | - ConnectPoint dstStaticPort = staticPort(dst); | 568 | + |
571 | - if (dstStaticPort != null) { | 569 | + if (staticPort(src) != null) { |
570 | + return false; | ||
571 | + } | ||
572 | + | ||
573 | + if (staticPort(dst) != null) { | ||
572 | return false; | 574 | return false; |
573 | } | 575 | } |
574 | 576 | ... | ... |
-
Please register or login to post a comment