Refactor: Narrow data provided to method
Change-Id: I959bea73ab2635ecce99ef8b51a584994287ec64
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompiler.java
index d1b0ec2..bcb0a2a 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompiler.java
@@ -194,7 +194,7 @@
}
// Check if both devices support multiplexing (usage of TributarySlots)
- boolean multiplexingSupported = isMultiplexingSupported(intent);
+ boolean multiplexingSupported = isMultiplexingSupported(intent.getSrc(), intent.getDst());
// slots are used only for devices supporting multiplexing
Set<TributarySlot> slots = Collections.emptySet();
@@ -581,10 +581,7 @@
return (driver != null && driver.hasBehaviour(TributarySlotQuery.class));
}
- private boolean isMultiplexingSupported(OpticalCircuitIntent intent) {
- ConnectPoint src = intent.getSrc();
- ConnectPoint dst = intent.getDst();
-
+ private boolean isMultiplexingSupported(ConnectPoint src, ConnectPoint dst) {
if (!isTributarySlotBehaviourSupported(src.deviceId()) ||
!isTributarySlotBehaviourSupported(dst.deviceId())) {
return false;