Sonar critical issues 55/40355/1
authorSurendra Reddy Katam <SK00524980@techmahindra.com>
Fri, 30 Mar 2018 09:33:11 +0000 (15:03 +0530)
committerSurendra Reddy Katam <SK00524980@techmahindra.com>
Fri, 30 Mar 2018 09:33:11 +0000 (15:03 +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-MbO932hFUzlqc5WD&resolved=false&severities=CRITICAL
Location:
src/main/java/com/att/nsa/mr/client/MRClientBuilders.java
Line No-301

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

index f9b8039..96d6fc5 100644 (file)
@@ -298,7 +298,7 @@ public class MRClientBuilders
                protected MRTopicManager constructClient ( Collection<String> hosts ) { try {
                        return new MRMetaClient ( hosts );
                } catch (MalformedURLException e) {
-                       throw new RuntimeException(e);
+                       throw new IllegalArgumentException(e);
                } }
        }