Thomas Vachuska

Collections.emptyMap() produces an object that Kryo cannot serialize

Change-Id: I12c105ecbcff560a62e5e883f18c0e75dd69c078
......@@ -16,21 +16,19 @@
package org.onosproject.net.intent;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.google.common.annotations.Beta;
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import org.onosproject.core.ApplicationId;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.Link;
import org.onosproject.net.flow.TrafficSelector;
import org.onosproject.net.flow.TrafficTreatment;
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* Abstraction of a connectivity intent that is implemented by a set of path
......@@ -118,7 +116,7 @@ public final class LinkCollectionIntent extends ConnectivityIntent {
Set<Link> links;
Set<ConnectPoint> ingressPoints;
Set<ConnectPoint> egressPoints;
Map<ConnectPoint, TrafficSelector> ingressSelectors = Collections.emptyMap();
Map<ConnectPoint, TrafficSelector> ingressSelectors = ImmutableMap.of();
boolean egressTreatmentFlag;
private Builder() {
......
......@@ -25,7 +25,6 @@ import org.onosproject.net.ConnectPoint;
import org.onosproject.net.flow.TrafficSelector;
import org.onosproject.net.flow.TrafficTreatment;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;
......@@ -74,7 +73,7 @@ public final class MultiPointToSinglePointIntent extends ConnectivityIntent {
int priority,
Map<ConnectPoint, TrafficSelector> ingressSelectors
) {
super(appId, key, Collections.emptyList(), selector, treatment, constraints,
super(appId, key, ImmutableSet.of(), selector, treatment, constraints,
priority);
checkNotNull(ingressPoints);
......@@ -127,7 +126,7 @@ public final class MultiPointToSinglePointIntent extends ConnectivityIntent {
public static final class Builder extends ConnectivityIntent.Builder {
Set<ConnectPoint> ingressPoints;
ConnectPoint egressPoint;
Map<ConnectPoint, TrafficSelector> ingressSelectors = Collections.emptyMap();
Map<ConnectPoint, TrafficSelector> ingressSelectors = ImmutableMap.of();
private Builder() {
// Hide constructor
......