Bug-731: Fixed few major Sonar warnings
[bgpcep.git] / bgp / parser-impl / src / main / java / org / opendaylight / protocol / bgp / parser / impl / message / BGPOpenMessageParser.java
index 4c47d9c699d6ac07d2e6e485b1cf7826412993e6..1694c73d70b63244eb1832ad1142f1df8bb64a06 100644 (file)
@@ -66,7 +66,7 @@ public final class BGPOpenMessageParser implements MessageParser, MessageSeriali
      */
     @Override
     public void serializeMessage(final Notification msg, final ByteBuf bytes) {
-        Preconditions.checkArgument(msg != null && msg instanceof Open, "BGP Open message cannot be null");
+        Preconditions.checkArgument(msg instanceof Open, "BGP Open message cannot be null");
         LOG.trace("Started serializing open message: {}", msg);
         final Open open = (Open) msg;
         final ByteBuf msgBody = Unpooled.buffer();