SONAR suggestion - generic exceptions
Replace uses of generic RuntimeException
with more appropriate unchecked exceptions
Change-Id: If283743c2cf7252b8d280bdb788708ebbe57da9d
diff --git a/utils/misc/src/main/java/org/onlab/util/Tools.java b/utils/misc/src/main/java/org/onlab/util/Tools.java
index bf9bea0..4b2cac9 100644
--- a/utils/misc/src/main/java/org/onlab/util/Tools.java
+++ b/utils/misc/src/main/java/org/onlab/util/Tools.java
@@ -388,7 +388,7 @@
try {
Thread.sleep(ms);
} catch (InterruptedException e) {
- throw new RuntimeException("Interrupted", e);
+ throw new IllegalStateException("Interrupted", e);
}
}
@@ -460,7 +460,7 @@
try {
Thread.sleep(random.nextInt(ms));
} catch (InterruptedException e) {
- throw new RuntimeException("Interrupted", e);
+ throw new IllegalStateException("Interrupted", e);
}
}
@@ -474,7 +474,7 @@
try {
Thread.sleep(ms, nanos);
} catch (InterruptedException e) {
- throw new RuntimeException("Interrupted", e);
+ throw new IllegalStateException("Interrupted", e);
}
}