From: Surendra Reddy Katam Date: Wed, 4 Apr 2018 10:52:02 +0000 (+0530) Subject: Sonar critical issues X-Git-Tag: v1.1.4~1 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F29%2F40929%2F1;p=dmaap%2Fmessagerouter%2Fdmaapclient.git Sonar critical issues Define and throw a dedicated exception instead of using a generic one Sonar Link: https://sonar.onap.org/project/issues?assignees=surendraReddy&id=org.onap.dmaap.messagerouter.dmaapclient%3AdmaapClient&open=AV4-MbPQ32hFUzlqc5XF&resolved=false&severities=CRITICAL Location: src/main/java/com/att/nsa/mr/client/MRClientFactory.java Line No-565 Change-Id: I4f5b03efd3cbc885680ded0ec6a496c60ecc793e Issue-ID: DMAAP-385 Signed-off-by: Surendra Reddy Katam --- diff --git a/src/main/java/com/att/nsa/mr/client/MRClientFactory.java b/src/main/java/com/att/nsa/mr/client/MRClientFactory.java index 496f94e..32b44e4 100644 --- a/src/main/java/com/att/nsa/mr/client/MRClientFactory.java +++ b/src/main/java/com/att/nsa/mr/client/MRClientFactory.java @@ -562,7 +562,7 @@ public class MRClientFactory { try { tmi = new MRMetaClient(hostSet); } catch (MalformedURLException e) { - throw new RuntimeException(e); + throw new IllegalArgumentException(e); } tmi.setApiCredentials(apiKey, apiSecret); return tmi;