Add checkstyle rule to prevent empty statements (;)
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / packet / LLDP.java
index 1a0033ee963ebb1a4ec01c7923cece40dea0bdf9..6a896c6c712aee0e06d94b7be31bbf27529c7845 100644 (file)
@@ -12,6 +12,7 @@ import java.util.ArrayList;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
+import org.opendaylight.controller.sal.utils.HexEncode;
 import org.opendaylight.controller.sal.utils.NetUtils;
 
 /**
@@ -170,6 +171,10 @@ public class LLDP extends Packet {
         int lldpOffset = bitOffset; // LLDP start
         int lldpSize = size; // LLDP size
 
+        if (logger.isTraceEnabled()) {
+          logger.trace("LLDP: {} (offset {} bitsize {})", new Object[] {
+                  HexEncode.bytesToHexString(data), lldpOffset, lldpSize });
+        }
         /*
          * Deserialize the TLVs until we reach the end of the packet
          */
@@ -209,12 +214,16 @@ public class LLDP extends Packet {
             throw new PacketException(e.getMessage());
         }
 
+        if (logger.isTraceEnabled()) {
+          logger.trace("LLDP: serialized: {}",
+                  HexEncode.bytesToHexString(serializedBytes));
+        }
         return serializedBytes;
     }
 
     /**
      * Returns the size of LLDP packet in bytes
-     * 
+     *
      * @return int - LLDP Packet size in bytes
      */
     private int getLLDPPacketLength() {