Sonar critical issues 29/40929/1
authorSurendra Reddy Katam <SK00524980@techmahindra.com>
Wed, 4 Apr 2018 10:52:02 +0000 (16:22 +0530)
committerSurendra Reddy Katam <SK00524980@techmahindra.com>
Wed, 4 Apr 2018 10:52:02 +0000 (16:22 +0530)
 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 <SK00524980@techmahindra.com>
src/main/java/com/att/nsa/mr/client/MRClientFactory.java

index 496f94e..32b44e4 100644 (file)
@@ -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;