Sonar critical issues 79/40479/1
authorSurendra Reddy Katam <SK00524980@techmahindra.com>
Mon, 2 Apr 2018 05:45:06 +0000 (11:15 +0530)
committerSurendra Reddy Katam <SK00524980@techmahindra.com>
Mon, 2 Apr 2018 05:45:06 +0000 (11:15 +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=AWE8fY-w-08if2a6yLVJ&resolved=false&severities=CRITICAL
Location:
src/main/java/com/att/nsa/mr/client/MRClientFactory.java
Line No-587

Change-Id: Id1ee9768298af3f33cd67352e863a5f0f083ba64
Issue-ID: DMAAP-378
Signed-off-by: Surendra Reddy Katam <SK00524980@techmahindra.com>
src/main/java/com/att/nsa/mr/client/MRClientFactory.java

index 67de218..8513129 100644 (file)
@@ -584,7 +584,7 @@ public class MRClientFactory {
                try {
                        sub = new MRConsumerImpl(MRConsumerImpl.stringToList(host), topic, group, id, i, j, null, null, null);
                } catch (MalformedURLException e) {
-                       throw new RuntimeException(e);
+                       throw new IllegalArgumentException(e);
                }
                sub.setUsername(username);
                sub.setPassword(password);