Refactor: Narrow data provided to method
Change-Id: I0425a6c879be76498fc812790713d2db5062117e
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 bcb0a2a..ef0ea26 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
@@ -343,7 +343,8 @@
}
if (multiplexingSupported) {
- if (!isAvailableTributarySlots(connIntent, oduSignalType.tributarySlots())) {
+ if (!isAvailableTributarySlots(connIntent.getSrc(), connIntent.getDst(),
+ oduSignalType.tributarySlots())) {
continue;
}
}
@@ -354,8 +355,8 @@
return null;
}
- private boolean isAvailableTributarySlots(OpticalConnectivityIntent connIntent, int requestedTsNum) {
- Set<TributarySlot> common = findCommonTributarySlotsOnCps(connIntent.getSrc(), connIntent.getDst());
+ private boolean isAvailableTributarySlots(ConnectPoint src, ConnectPoint dst, int requestedTsNum) {
+ Set<TributarySlot> common = findCommonTributarySlotsOnCps(src, dst);
if (common.isEmpty()) {
log.debug("No available TributarySlots");
return false;