Fix Sonar warnings: bgp-bmp-impl
[bgpcep.git] / bgp / bmp-impl / src / main / java / org / opendaylight / protocol / bmp / impl / session / BmpSessionImpl.java
index 80cd5f5be4133b395664f2fa04fb540378d833fe..da83ac78c1d87cc7b188864959a3d7127da83c52 100644 (file)
@@ -57,7 +57,7 @@ public final class BmpSessionImpl extends SimpleChannelInboundHandler<Notificati
         try {
             super.channelInactive(ctx);
         } catch (final Exception e) {
-            throw new RuntimeException("Failed to delegate channel inactive event on channel " + ctx.channel(), e);
+            throw new IllegalStateException("Failed to delegate channel inactive event on channel " + ctx.channel(), e);
         }
     }
 
@@ -84,7 +84,7 @@ public final class BmpSessionImpl extends SimpleChannelInboundHandler<Notificati
     }
 
     @Override
-    public final String toString() {
+    public String toString() {
         return addToStringAttributes(MoreObjects.toStringHelper(this)).toString();
     }
 
@@ -116,7 +116,7 @@ public final class BmpSessionImpl extends SimpleChannelInboundHandler<Notificati
         }
     }
 
-    private static Reason getTerminationReason(TerminationMessage terminationMessage) {
+    private static Reason getTerminationReason(final TerminationMessage terminationMessage) {
         final Tlvs tlvs = terminationMessage.getTlvs();
         if (tlvs != null && tlvs.getReasonTlv() != null) {
             return tlvs.getReasonTlv().getReason();