Revert "Enhance the LLDPTLV.java to handle the LLDP port ID" 57/6957/2
authorEd Warnicke <eaw@cisco.com>
Tue, 13 May 2014 16:17:42 +0000 (11:17 -0500)
committerEd Warnicke <eaw@cisco.com>
Thu, 15 May 2014 00:44:16 +0000 (19:44 -0500)
This reverts commit 66ca7f84baed5633cd135c5037a8aa847d2b9621.

Change-Id: I7c5ed9181d52eabe2be0747fb6320796cf7a9f0e
Signed-off-by: Ed Warnicke <eaw@cisco.com>
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/packet/LLDPTLV.java

index efb938e37f50745aae8f1f560b0d85f2bb7e7c07..27660221ceb56da61d3c6c68cdfd46a13622ef96 100644 (file)
@@ -291,17 +291,10 @@ public class LLDPTLV extends Packet {
      * @return the string
      */
     static public String getStringValue(byte[] tlvValue, int tlvLen) {
-        byte[] pidSubType = new byte[portIDSubType.length];
         byte[] pidBytes = new byte[tlvLen - portIDSubType.length];
-        System.arraycopy(tlvValue, 0, pidSubType, 0,
-                pidSubType.length);
         System.arraycopy(tlvValue, portIDSubType.length, pidBytes, 0,
                 pidBytes.length);
-        if (pidSubType[0] == (byte) 0x3) {
-            return HexEncode.bytesToHexStringFormat(pidBytes);
-        } else {
-            return (new String(pidBytes, Charset.defaultCharset()));
-        }
+        return (new String(pidBytes, Charset.defaultCharset()));
     }
 
     /**