Fixed netty & checkstyle failures
[openflowjava.git] / openflow-protocol-impl / src / test / java / org / opendaylight / openflowjava / protocol / impl / serialization / factories / OF10PacketOutInputMessageFactoryTest.java
index 6b1ff682edfed40a730ae6ddada2957063e9a98b..af4f139e93c0506b2f8a9202da144fc76e90639e 100644 (file)
@@ -94,7 +94,9 @@ public class OF10PacketOutInputMessageFactoryTest {
         Assert.assertEquals("Wrong action type", 3, out.readUnsignedShort());
         Assert.assertEquals("Wrong action length", 8, out.readUnsignedShort());
         out.skipBytes(4);
-        Assert.assertArrayEquals("Wrong data", message.getData(), out.readBytes(out.readableBytes()).array());
+        byte[] readData = new byte[out.readableBytes()];
+        out.readBytes(readData);
+        Assert.assertArrayEquals("Wrong data", message.getData(), readData);
         Assert.assertTrue("Unread data", out.readableBytes() == 0);
     }