Fix - bug 270
[openflowjava.git] / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / deserialization / factories / OF10FeaturesReplyMessageFactory.java
index 6c5117830172e00e1ba20053eef0f96e96a715b1..ea859a2d53fe95aff9fd56ec826877ee986d2b4d 100644 (file)
@@ -57,9 +57,9 @@ public class OF10FeaturesReplyMessageFactory implements OFDeserializer<GetFeatur
         GetFeaturesOutputBuilder builder = new GetFeaturesOutputBuilder();
         builder.setVersion(version);
         builder.setXid(rawMessage.readUnsignedInt());
-        byte[] datapathId = new byte[Long.SIZE/Byte.SIZE];
+        byte[] datapathId = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
         rawMessage.readBytes(datapathId);
-        builder.setDatapathId(new BigInteger(datapathId));
+        builder.setDatapathId(new BigInteger(1, datapathId));
         builder.setBuffers(rawMessage.readUnsignedInt());
         builder.setTables(rawMessage.readUnsignedByte());
         rawMessage.skipBytes(PADDING_IN_FEATURES_REPLY_HEADER);