Sonar critical issues 85/40685/1
authorSurendra Reddy Katam <SK00524980@techmahindra.com>
Tue, 3 Apr 2018 12:27:17 +0000 (17:57 +0530)
committerSurendra Reddy Katam <SK00524980@techmahindra.com>
Tue, 3 Apr 2018 12:27:17 +0000 (17:57 +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=AWEpWai0-08if2a6yEXQ&resolved=false&severities=CRITICAL
Location:
src/main/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisher.java
Line No-115

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

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