Simplify statements to define serializer just for KryoNamespaces.API
Change-Id: Iac8c6233ab142bc382f35fbd070d4386a7baf64c
diff --git a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentDeviceResourceStore.java b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentDeviceResourceStore.java
index 78cbb28..3266e96 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentDeviceResourceStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentDeviceResourceStore.java
@@ -21,7 +21,6 @@
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.ReferenceCardinality;
import org.apache.felix.scr.annotations.Service;
-import org.onlab.util.KryoNamespace;
import org.onosproject.net.DeviceId;
import org.onosproject.net.Port;
import org.onosproject.net.device.DeviceService;
@@ -56,8 +55,7 @@
private static final String INTENT_MAPPING = "IntentMapping";
private static final String INTENT_ALLOCATIONS = "PortIntentAllocations";
- private static final Serializer SERIALIZER = Serializer.using(
- new KryoNamespace.Builder().register(KryoNamespaces.API).build());
+ private static final Serializer SERIALIZER = Serializer.using(KryoNamespaces.API);
private ConsistentMap<Port, IntentId> portAllocMap;
private ConsistentMap<IntentId, Set<Port>> intentAllocMap;
diff --git a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentLinkResourceStore.java b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentLinkResourceStore.java
index af9a07e..ce25f86 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentLinkResourceStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentLinkResourceStore.java
@@ -20,7 +20,6 @@
import org.onosproject.net.OmsPort;
import org.onosproject.net.device.DeviceService;
import org.slf4j.Logger;
-import org.onlab.util.KryoNamespace;
import org.onlab.util.PositionalParameterStringFormatter;
import org.onosproject.net.Link;
import org.onosproject.net.LinkKey;
@@ -85,8 +84,7 @@
/** IntentId -> LinkResourceAllocations. */
private static final String INTENT_ALLOCATIONS = "LinkIntentAllocations";
- private static final Serializer SERIALIZER = Serializer.using(
- new KryoNamespace.Builder().register(KryoNamespaces.API).build());
+ private static final Serializer SERIALIZER = Serializer.using(KryoNamespaces.API);
// for reading committed values.
private ConsistentMap<IntentId, LinkResourceAllocations> intentAllocMap;