Sonar critical issues 45/40345/1
authorSurendra Reddy Katam <SK00524980@techmahindra.com>
Fri, 30 Mar 2018 08:46:12 +0000 (14:16 +0530)
committerSurendra Reddy Katam <SK00524980@techmahindra.com>
Fri, 30 Mar 2018 08:46:12 +0000 (14:16 +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-MbPP32hFUzlqc5XD&resolved=false&severities=CRITICAL
Location:
src/main/java/com/att/nsa/mr/client/MRClientFactory.java
Line No-246

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

index a92151e..67de218 100644 (file)
@@ -243,7 +243,7 @@ public class MRClientFactory {
                        return new MRConsumerImpl(hostSet, topic, consumerGroup, consumerId, timeoutMs, limit, filter, apiKey,
                                        apiSecret);
                } catch (MalformedURLException e) {
-                       throw new RuntimeException(e);
+                       throw new IllegalArgumentException(e);
                }
        }