Sho SHIMIZU

Refactor: Narrow data provided to method

Change-Id: I959bea73ab2635ecce99ef8b51a584994287ec64
...@@ -194,7 +194,7 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu ...@@ -194,7 +194,7 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu
194 } 194 }
195 195
196 // Check if both devices support multiplexing (usage of TributarySlots) 196 // Check if both devices support multiplexing (usage of TributarySlots)
197 - boolean multiplexingSupported = isMultiplexingSupported(intent); 197 + boolean multiplexingSupported = isMultiplexingSupported(intent.getSrc(), intent.getDst());
198 198
199 // slots are used only for devices supporting multiplexing 199 // slots are used only for devices supporting multiplexing
200 Set<TributarySlot> slots = Collections.emptySet(); 200 Set<TributarySlot> slots = Collections.emptySet();
...@@ -581,10 +581,7 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu ...@@ -581,10 +581,7 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu
581 return (driver != null && driver.hasBehaviour(TributarySlotQuery.class)); 581 return (driver != null && driver.hasBehaviour(TributarySlotQuery.class));
582 } 582 }
583 583
584 - private boolean isMultiplexingSupported(OpticalCircuitIntent intent) { 584 + private boolean isMultiplexingSupported(ConnectPoint src, ConnectPoint dst) {
585 - ConnectPoint src = intent.getSrc();
586 - ConnectPoint dst = intent.getDst();
587 -
588 if (!isTributarySlotBehaviourSupported(src.deviceId()) || 585 if (!isTributarySlotBehaviourSupported(src.deviceId()) ||
589 !isTributarySlotBehaviourSupported(dst.deviceId())) { 586 !isTributarySlotBehaviourSupported(dst.deviceId())) {
590 return false; 587 return false;
......