Sonar related fixes
- suppress SONAR warning for printing stack trace in CLI
- add string constants for the Sonar suppression identifiers
Change-Id: I03992f89675f9d074347042b7a196dbcc1036c28
diff --git a/utils/netty/src/main/java/org/onlab/netty/MessageDecoder.java b/utils/netty/src/main/java/org/onlab/netty/MessageDecoder.java
index a94a38b..e5382e1 100644
--- a/utils/netty/src/main/java/org/onlab/netty/MessageDecoder.java
+++ b/utils/netty/src/main/java/org/onlab/netty/MessageDecoder.java
@@ -15,8 +15,6 @@
*/
package org.onlab.netty;
-import static com.google.common.base.Preconditions.checkState;
-
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ReplayingDecoder;
@@ -31,6 +29,9 @@
import com.google.common.base.Charsets;
+import static com.google.common.base.Preconditions.checkState;
+import static org.onlab.util.SonarSuppressionConstants.SONAR_SWITCH_FALLTHROUGH;
+
/**
* Decoder for inbound messages.
*/
@@ -54,7 +55,7 @@
}
@Override
- @java.lang.SuppressWarnings("squid:S128") // suppress switch fall through warning
+ @java.lang.SuppressWarnings(SONAR_SWITCH_FALLTHROUGH) // suppress switch fall through warning
protected void decode(
ChannelHandlerContext context,
ByteBuf buffer,