Use arrow cases in mdsal-replicate-netty
[mdsal.git] / replicate / mdsal-replicate-netty / src / main / java / org / opendaylight / mdsal / replicate / netty / SourceRequestHandler.java
index 8928dbadd3e65974b072a93a925c258a9fde77ae..d2f8fd503d44faa99d1c7ee1a412c7c245f4c3a7 100644 (file)
@@ -59,13 +59,11 @@ final class SourceRequestHandler extends SimpleChannelInboundHandler<ByteBuf> {
         final Channel channel = ctx.channel();
         LOG.trace("Channel {} received message type {}", channel, msgType);
         switch (msgType) {
-            case Constants.MSG_SUBSCRIBE_REQ:
-                subscribe(channel, msg);
-                break;
-            case Constants.MSG_PONG:
-                break;
-            default:
-                throw new IllegalStateException("Unexpected message type " + msgType);
+            case Constants.MSG_SUBSCRIBE_REQ -> subscribe(channel, msg);
+            case Constants.MSG_PONG -> {
+                // No-op
+            }
+            default -> throw new IllegalStateException("Unexpected message type " + msgType);
         }
     }