Fixed netty & checkstyle failures
[openflowjava.git] / openflow-protocol-impl / src / test / java / org / opendaylight / openflowjava / protocol / impl / serialization / factories / OF10PacketInMessageFactoryTest.java
index 5d3c3a8d97a75a19e19dd6e8178704fb9e1717c4..abe0055dd2604aa7c7d3b33aadd4e7a370adb589 100644 (file)
@@ -58,7 +58,8 @@ public class OF10PacketInMessageFactoryTest {
         Assert.assertEquals("Wrong port in", message.getInPort().intValue(), serializedBuffer.readUnsignedShort());
         Assert.assertEquals("Wrong reason", message.getReason().getIntValue(), serializedBuffer.readUnsignedByte());
         serializedBuffer.skipBytes(1);
-        Assert.assertArrayEquals("Wrong data", message.getData(),
-                serializedBuffer.readBytes(serializedBuffer.readableBytes()).array());
+        byte[] readData = new byte[serializedBuffer.readableBytes()];
+        serializedBuffer.readBytes(readData);
+        Assert.assertArrayEquals("Wrong data", message.getData(), readData);
     }
 }