From 8e662e7917f7ea9c34b409da62fc8bc15027c413 Mon Sep 17 00:00:00 2001 From: Surendra Reddy Katam Date: Fri, 30 Mar 2018 14:16:12 +0530 Subject: [PATCH] Sonar critical issues 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 --- src/main/java/com/att/nsa/mr/client/MRClientFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/att/nsa/mr/client/MRClientFactory.java b/src/main/java/com/att/nsa/mr/client/MRClientFactory.java index a92151e..67de218 100644 --- a/src/main/java/com/att/nsa/mr/client/MRClientFactory.java +++ b/src/main/java/com/att/nsa/mr/client/MRClientFactory.java @@ -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); } } -- 2.16.6