Sonar critical issues 47/40347/1
authorSurendra Reddy Katam <SK00524980@techmahindra.com>
Fri, 30 Mar 2018 09:11:51 +0000 (14:41 +0530)
committerSurendra Reddy Katam <SK00524980@techmahindra.com>
Fri, 30 Mar 2018 09:11:51 +0000 (14:41 +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-MbO932hFUzlqc5WB&resolved=false&severities=CRITICAL
Location:
src/main/java/com/att/nsa/mr/client/MRClientBuilders.java
Line No-134

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

index c7707f1..f9b8039 100644 (file)
@@ -131,7 +131,7 @@ public class MRClientBuilders
                        try {
                                return new MRConsumerImpl ( fHosts, fTopic, fGroup, fId, fTimeoutMs, fLimit, fFilter, fApiKey, fApiSecret );
                        } catch (MalformedURLException e) {
-                               throw new RuntimeException(e);
+                               throw new IllegalArgumentException(e);
                        }
                }