Sonar critical issues 97/40897/1
authorSurendra Reddy Katam <SK00524980@techmahindra.com>
Wed, 4 Apr 2018 06:51:22 +0000 (12:21 +0530)
committerSurendra Reddy Katam <SK00524980@techmahindra.com>
Wed, 4 Apr 2018 06:51:22 +0000 (12:21 +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-MbO932hFUzlqc5WC&resolved=false&severities=CRITICAL
Location:
src/main/java/com/att/nsa/mr/client/MRClientBuilders.java
Line No-282

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

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