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/misc/src/main/java/org/onlab/util/BoundedThreadPool.java b/utils/misc/src/main/java/org/onlab/util/BoundedThreadPool.java
index 4364345..627f141 100644
--- a/utils/misc/src/main/java/org/onlab/util/BoundedThreadPool.java
+++ b/utils/misc/src/main/java/org/onlab/util/BoundedThreadPool.java
@@ -15,8 +15,6 @@
*/
package org.onlab.util;
-import org.slf4j.LoggerFactory;
-
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import java.util.concurrent.LinkedBlockingQueue;
@@ -26,6 +24,10 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
+import org.slf4j.LoggerFactory;
+
+import static org.onlab.util.SonarSuppressionConstants.SONAR_CALL_RUN;
+
/**
* Implementation of ThreadPoolExecutor that bounds the work queue.
* <p>
@@ -137,7 +139,7 @@
* Feedback policy that delays the caller's thread until the executor's work
* queue falls below a threshold, then runs the job on the caller's thread.
*/
- @java.lang.SuppressWarnings("squid:S1217") // We really do mean to call run()
+ @java.lang.SuppressWarnings(SONAR_CALL_RUN) // We really do mean to call run()
private static final class CallerFeedbackPolicy implements RejectedExecutionHandler {
private final BlockingBoolean underLoad = new BlockingBoolean(false);