Removed dead code in LLDPDiscoveryUtil 14/4014/2
authorEd Warnicke <eaw@cisco.com>
Fri, 3 Jan 2014 18:11:23 +0000 (10:11 -0800)
committerEd Warnicke <eaw@cisco.com>
Mon, 6 Jan 2014 12:40:55 +0000 (04:40 -0800)
Per aboch, lldp.getOptionalTLVList() never returns null
and thus the code checking for it is dead code.

Change-Id: I23a0951313095a09cc7fbeaeb7e254c157a77f8c
Signed-off-by: Ed Warnicke <eaw@cisco.com>
opendaylight/md-sal/topology-lldp-discovery/src/main/java/org/opendaylight/md/controller/topology/lldp/utils/LLDPDiscoveryUtils.java

index 716b1f281ac913acf0427e52ae69ad5d0e1a9eea..c0bcbaa8ad1684daa531f7594898f016d154069d 100644 (file)
@@ -1,7 +1,6 @@
 package org.opendaylight.md.controller.topology.lldp.utils;
 
 import java.nio.charset.Charset;
-import java.util.List;
 
 import org.opendaylight.controller.sal.packet.Ethernet;
 import org.opendaylight.controller.sal.packet.LLDP;
@@ -46,10 +45,6 @@ public class LLDPDiscoveryUtils {
             LLDP lldp = (LLDP) ethPkt.getPayload();
     
             try {
-                List<LLDPTLV> optionalTLVList = lldp.getOptionalTLVList();
-                if (optionalTLVList == null) {
-                    return null;
-                }
                 NodeId srcNodeId = null;
                 NodeConnectorId srcNodeConnectorId = null;
                 for (LLDPTLV lldptlv : lldp.getOptionalTLVList()) {