Clean up version setters
[openflowplugin.git] / openflowjava / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / deserialization / factories / OF10FlowModInputMessageFactory.java
index 89102da055848d3df4b3d236361629c6ea783c62..68208323d8cd40f1d5abc3e328e26a1970a25a45 100644 (file)
@@ -50,9 +50,9 @@ public class OF10FlowModInputMessageFactory implements OFDeserializer<FlowModInp
     public FlowModInput deserialize(ByteBuf rawMessage) {
         Objects.requireNonNull(registry);
 
-        FlowModInputBuilder builder = new FlowModInputBuilder();
-        builder.setVersion((short) EncodeConstants.OF10_VERSION_ID);
-        builder.setXid(readUint32(rawMessage));
+        FlowModInputBuilder builder = new FlowModInputBuilder()
+                .setVersion(EncodeConstants.OF_VERSION_1_0)
+                .setXid(readUint32(rawMessage));
         OFDeserializer<MatchV10> matchDeserializer = registry.getDeserializer(
                 new MessageCodeKey(EncodeConstants.OF10_VERSION_ID, EncodeConstants.EMPTY_VALUE, MatchV10.class));
         builder.setMatchV10(matchDeserializer.deserialize(rawMessage));