Sonar critical issues 03/40503/1
authorSurendra Reddy Katam <SK00524980@techmahindra.com>
Mon, 2 Apr 2018 09:50:19 +0000 (15:20 +0530)
committerSurendra Reddy Katam <SK00524980@techmahindra.com>
Mon, 2 Apr 2018 09:50:19 +0000 (15:20 +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=AWE97JSU-08if2a6yOTq&resolved=false&severities=CRITICAL
Location:
src/main/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisher.java
Line No-108

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

index 2bb4e73..b211695 100644 (file)
@@ -105,7 +105,7 @@ public class MRSimplerBatchPublisher extends MRBaseClient implements MRBatchingP
                                        return new MRSimplerBatchPublisher(fUrls, fTopic, fMaxBatchSize, fMaxBatchAgeMs, fCompress,
                                                        fAllowSelfSignedCerts, threadOccuranceTime);
                                } catch (MalformedURLException e) {
-                                       throw new RuntimeException(e);
+                                       throw new IllegalArgumentException(e);
                                }
                        } else {
                                try {