commit | dbd3821cf02c20a65cae5ab850780cf0bbc0b6f0 | [log] [tgz] |
---|---|---|
author | Ray Milkey <ray@opennetworking.org> | Mon Jul 02 09:18:09 2018 -0700 |
committer | Thomas Vachuska <tom@opennetworking.org> | Mon Jul 02 18:03:00 2018 +0000 |
tree | ed361bf65918f895ca7288622e97d5da8e757092 | |
parent | bcc53d326876f90f074889ce9d9ccdcd1f0bcae1 [diff] [blame] |
Checkstyle rule to prevent throwing the generic RuntimeException This is a frequent cause of sonar breakage. Change-Id: I54e0044447633a61bab560b020b57ed0a6875ebe
diff --git a/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/ctl/SafeThriftClient.java b/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/ctl/SafeThriftClient.java index a510954..c1b83da 100644 --- a/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/ctl/SafeThriftClient.java +++ b/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/ctl/SafeThriftClient.java
@@ -94,7 +94,8 @@ } } - throw new RuntimeException("Class needs to implement Iface directly. Use wrap(TServiceClient, Class) instead."); + throw new IllegalStateException( + "Class needs to implement Iface directly. Use wrap(TServiceClient, Class) instead."); } /** @@ -202,7 +203,7 @@ Thread.sleep(timeBetweenRetries); } catch (InterruptedException e2) { Thread.currentThread().interrupt(); - throw new RuntimeException(e); + throw new IllegalStateException(e); } } }