Fix spotbugs logging complaints
[openflowplugin.git] / applications / topology-lldp-discovery / src / main / java / org / opendaylight / openflowplugin / applications / topology / lldp / utils / LLDPDiscoveryUtils.java
index cc667ae67dc98e3e328320729dfc1fd340613d47..5681e18ceaf6acce49301403d8638f98457ce8c6 100644 (file)
@@ -17,9 +17,7 @@ import java.nio.ByteBuffer;
 import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
 import java.util.Arrays;
-import java.util.Objects;
 import java.util.Optional;
-
 import org.apache.commons.lang3.ArrayUtils;
 import org.opendaylight.mdsal.eos.binding.api.Entity;
 import org.opendaylight.mdsal.eos.binding.api.EntityOwnershipService;
@@ -91,7 +89,7 @@ public final class LLDPDiscoveryUtils {
             try {
                 ethPkt.deserialize(payload, 0, payload.length * NetUtils.NUM_BITS_IN_A_BYTE);
             } catch (PacketException e) {
-                LOG.warn("Failed to decode LLDP packet {}", e);
+                LOG.warn("Failed to decode LLDP packet", e);
                 return nodeConnectorRef;
             }
 
@@ -176,7 +174,7 @@ public final class LLDPDiscoveryUtils {
     }
 
     private static boolean isLLDP(final byte[] packet) {
-        if (Objects.isNull(packet) || packet.length < MINIMUM_LLDP_SIZE) {
+        if (packet == null || packet.length < MINIMUM_LLDP_SIZE) {
             return false;
         }