DeviceIdSerializer: use case normalized String
Change-Id: I6995e224ed5567e3d2d65dac3891252dd8c4dd7b
diff --git a/core/store/serializers/src/main/java/org/onosproject/store/serializers/DeviceIdSerializer.java b/core/store/serializers/src/main/java/org/onosproject/store/serializers/DeviceIdSerializer.java
index 24f18f0..a74a769 100644
--- a/core/store/serializers/src/main/java/org/onosproject/store/serializers/DeviceIdSerializer.java
+++ b/core/store/serializers/src/main/java/org/onosproject/store/serializers/DeviceIdSerializer.java
@@ -15,8 +15,6 @@
*/
package org.onosproject.store.serializers;
-import java.net.URI;
-
import org.onosproject.net.DeviceId;
import com.esotericsoftware.kryo.Kryo;
@@ -39,12 +37,12 @@
@Override
public void write(Kryo kryo, Output output, DeviceId object) {
- kryo.writeObject(output, object.uri());
+ output.writeString(object.toString());
}
@Override
public DeviceId read(Kryo kryo, Input input, Class<DeviceId> type) {
- final URI uri = kryo.readObject(input, URI.class);
- return DeviceId.deviceId(uri);
+ final String str = input.readString();
+ return DeviceId.deviceId(str);
}
}