Fixed netty & checkstyle failures
[openflowjava.git] / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / deserialization / factories / EchoReplyMessageFactory.java
index 8c8ba38963d30e1c30b425ccc7d5a9c1ea18703d..5d3ecde73db018484c644e5c02a61d6786f9f905 100644 (file)
@@ -29,7 +29,9 @@ public class EchoReplyMessageFactory implements OFDeserializer<EchoOutput> {
         builder.setXid(rawMessage.readUnsignedInt());
         int remainingBytes = rawMessage.readableBytes();
         if (remainingBytes > 0) {
-            builder.setData(rawMessage.readBytes(remainingBytes).array());
+            byte[] data = new byte[remainingBytes];
+            rawMessage.readBytes(data);
+            builder.setData(data);
         }
         return builder.build();
     }