mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-11-07 03:32:03 +01:00
DeviceIdSerializer: use case normalized String
Change-Id: I6995e224ed5567e3d2d65dac3891252dd8c4dd7b
This commit is contained in:
parent
351e2f63ef
commit
c1ee6746aa
@ -15,8 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.onosproject.store.serializers;
|
package org.onosproject.store.serializers;
|
||||||
|
|
||||||
import java.net.URI;
|
|
||||||
|
|
||||||
import org.onosproject.net.DeviceId;
|
import org.onosproject.net.DeviceId;
|
||||||
|
|
||||||
import com.esotericsoftware.kryo.Kryo;
|
import com.esotericsoftware.kryo.Kryo;
|
||||||
@ -39,12 +37,12 @@ public final class DeviceIdSerializer extends Serializer<DeviceId> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void write(Kryo kryo, Output output, DeviceId object) {
|
public void write(Kryo kryo, Output output, DeviceId object) {
|
||||||
kryo.writeObject(output, object.uri());
|
output.writeString(object.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DeviceId read(Kryo kryo, Input input, Class<DeviceId> type) {
|
public DeviceId read(Kryo kryo, Input input, Class<DeviceId> type) {
|
||||||
final URI uri = kryo.readObject(input, URI.class);
|
final String str = input.readString();
|
||||||
return DeviceId.deviceId(uri);
|
return DeviceId.deviceId(str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user