SONAR suggestion - proper handling of InterruptedException
Change-Id: I67a93c064708c207d9ce83fac319682c2d17db60
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 4b2cac9..69baf47 100644
--- a/utils/misc/src/main/java/org/onlab/util/Tools.java
+++ b/utils/misc/src/main/java/org/onlab/util/Tools.java
@@ -388,6 +388,7 @@
try {
Thread.sleep(ms);
} catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
throw new IllegalStateException("Interrupted", e);
}
}
@@ -460,6 +461,7 @@
try {
Thread.sleep(random.nextInt(ms));
} catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
throw new IllegalStateException("Interrupted", e);
}
}
@@ -474,6 +476,7 @@
try {
Thread.sleep(ms, nanos);
} catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
throw new IllegalStateException("Interrupted", e);
}
}