Suppress unchecked cast warnings 34/5434/3
authorRobert Varga <rovarga@cisco.com>
Tue, 18 Feb 2014 10:45:26 +0000 (11:45 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 25 Feb 2014 17:39:30 +0000 (17:39 +0000)
These casts are either safe, or we need to throw an exception --
ClassCast is as good an exception as any.

Change-Id: I74026fee5004984bfc18d990a3b6fee68a1fb479
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/protocol/framework/AbstractProtocolSession.java
opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/protocol/framework/AbstractSessionNegotiator.java

index e7bd66574036111c72a0ddad5291afdd905e1ac7..47e96d1ff490df392accfb84dc10d55eb84a4583 100644 (file)
@@ -40,6 +40,7 @@ public abstract class AbstractProtocolSession<M> extends SimpleChannelInboundHan
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     protected final void channelRead0(final ChannelHandlerContext ctx, final Object msg) {
         LOG.debug("Message was received: {}", msg);
         handleMessage((M) msg);
index d41e8106c5aec85166b43d72241b7fb600921801..cbe923524516077497f806fdad9b74c4d84e9927 100644 (file)
@@ -85,6 +85,7 @@ public abstract class AbstractSessionNegotiator<M, S extends AbstractProtocolSes
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     public final void channelRead(final ChannelHandlerContext ctx, final Object msg) {
         LOG.debug("Negotiation read invoked on channel {}", channel);
         try {