added length check for mask
[openflowjava.git] / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / util / ByteBufUtils.java
index a1dced8f4ef07356c15699f9bd12807f544de387..06af9d4f6c742378fc345ffa1dedd136fe19297b 100644 (file)
@@ -166,7 +166,7 @@ public abstract class ByteBufUtils {
     public static String bytesToHexString(byte[] array) {
         StringBuffer sb = new StringBuffer();
         for (int i = 0; i < array.length; i++) {
-            short b = array[i];
+            byte b = array[i];
             sb.append(String.format("%02x ", b));
         }
         return sb.toString();