commit | 2b4958a4635362c8f5cbe6845d9bb9aff9d0f47b | [log] [tgz] |
---|---|---|
author | Ray Milkey <ray@opennetworking.org> | Tue Feb 06 18:59:06 2018 -0800 |
committer | Ray Milkey <ray@opennetworking.org> | Tue Feb 06 18:59:06 2018 -0800 |
tree | f022ca93e639388b239723d283f3d02285b7058b | |
parent | 074ba9b90f7b60dc78f22bb379f9dbfceecd7a95 [diff] [blame] |
SONAR suggestion - don't use generic exceptions Change-Id: I77c4325281e94e189b7f1212a932f7e912b56b51
diff --git a/drivers/polatis/netconf/src/main/java/org/onosproject/drivers/polatis/netconf/PolatisFlowRuleProgrammable.java b/drivers/polatis/netconf/src/main/java/org/onosproject/drivers/polatis/netconf/PolatisFlowRuleProgrammable.java index 46b6a87..d5a025c 100644 --- a/drivers/polatis/netconf/src/main/java/org/onosproject/drivers/polatis/netconf/PolatisFlowRuleProgrammable.java +++ b/drivers/polatis/netconf/src/main/java/org/onosproject/drivers/polatis/netconf/PolatisFlowRuleProgrammable.java
@@ -143,7 +143,7 @@ private String parseKeyPairCompat() { String rev = opticalRevision(handler()); if (rev == null) { - throw new RuntimeException(new NetconfException("Failed to obtain the revision.")); + throw new IllegalStateException(new NetconfException("Failed to obtain the revision.")); } String keyPairCompat; try { @@ -156,7 +156,7 @@ keyPairCompat = KEY_PAIR; } } catch (ParseException e) { - throw new RuntimeException(new NetconfException(String.format("Incorrect date format: %s", rev))); + throw new IllegalArgumentException(new NetconfException(String.format("Incorrect date format: %s", rev))); } return keyPairCompat; }