Yuta HIGUCHI

serialization related fixes for flow related classes

Change-Id: Id7e1241cc73645bd87b61eac4ca45acd35ad22ca
......@@ -8,7 +8,6 @@ import org.onlab.packet.IpPrefix;
import org.onlab.packet.MacAddress;
import org.onlab.packet.VlanId;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
......@@ -27,7 +26,7 @@ public final class DefaultTrafficSelector implements TrafficSelector {
* @param criteria criteria
*/
private DefaultTrafficSelector(Set<Criterion> criteria) {
this.criteria = Collections.unmodifiableSet(criteria);
this.criteria = ImmutableSet.copyOf(criteria);
}
@Override
......
......@@ -7,7 +7,8 @@ import org.onlab.packet.IpPrefix;
import org.onlab.packet.MacAddress;
import org.onlab.packet.VlanId;
import java.util.Collections;
import com.google.common.collect.ImmutableList;
import java.util.LinkedList;
import java.util.List;
import java.util.Objects;
......@@ -25,7 +26,7 @@ public final class DefaultTrafficTreatment implements TrafficTreatment {
* @param instructions treatment instructions
*/
private DefaultTrafficTreatment(List<Instruction> instructions) {
this.instructions = Collections.unmodifiableList(instructions);
this.instructions = ImmutableList.copyOf(instructions);
}
@Override
......
......@@ -26,6 +26,7 @@ import org.onlab.onos.net.PortNumber;
import org.onlab.onos.net.device.DefaultDeviceDescription;
import org.onlab.onos.net.device.DefaultPortDescription;
import org.onlab.onos.net.flow.DefaultFlowRule;
import org.onlab.onos.net.flow.DefaultTrafficSelector;
import org.onlab.onos.net.flow.FlowId;
import org.onlab.onos.net.host.DefaultHostDescription;
import org.onlab.onos.net.host.HostDescription;
......@@ -88,7 +89,8 @@ public final class KryoNamespaces {
HostDescription.class,
DefaultHostDescription.class,
DefaultFlowRule.class,
FlowId.class
FlowId.class,
DefaultTrafficSelector.class
)
.register(URI.class, new URISerializer())
.register(NodeId.class, new NodeIdSerializer())
......