Refactor: improve null safety by using empty list instead of null
Change-Id: I443942ef82819e0c27df2c2acd45eb9106038992
diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/MultiPointToSinglePointIntent.java b/core/api/src/main/java/org/onlab/onos/net/intent/MultiPointToSinglePointIntent.java
index 90907fb..8c8cbb0 100644
--- a/core/api/src/main/java/org/onlab/onos/net/intent/MultiPointToSinglePointIntent.java
+++ b/core/api/src/main/java/org/onlab/onos/net/intent/MultiPointToSinglePointIntent.java
@@ -22,6 +22,7 @@
import org.onlab.onos.net.flow.TrafficSelector;
import org.onlab.onos.net.flow.TrafficTreatment;
+import java.util.Collections;
import java.util.List;
import java.util.Set;
@@ -55,14 +56,7 @@
TrafficTreatment treatment,
Set<ConnectPoint> ingressPoints,
ConnectPoint egressPoint) {
- super(id(MultiPointToSinglePointIntent.class, selector, treatment,
- ingressPoints, egressPoint), appId, null, selector, treatment);
-
- checkNotNull(ingressPoints);
- checkArgument(!ingressPoints.isEmpty(), "Ingress point set cannot be empty");
-
- this.ingressPoints = Sets.newHashSet(ingressPoints);
- this.egressPoint = checkNotNull(egressPoint);
+ this(appId, selector, treatment, ingressPoints, egressPoint, Collections.emptyList());
}
/**