mirror of
				https://github.com/opennetworkinglab/onos.git
				synced 2025-11-04 02:01:11 +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;
 | 
			
		||||
 | 
			
		||||
import java.net.URI;
 | 
			
		||||
 | 
			
		||||
import org.onosproject.net.DeviceId;
 | 
			
		||||
 | 
			
		||||
import com.esotericsoftware.kryo.Kryo;
 | 
			
		||||
@ -39,12 +37,12 @@ public final class DeviceIdSerializer extends Serializer<DeviceId> {
 | 
			
		||||
 | 
			
		||||
    @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);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user