Sonar critical issues 71/40471/1
authorSurendra Reddy Katam <SK00524980@techmahindra.com>
Mon, 2 Apr 2018 05:08:36 +0000 (10:38 +0530)
committerSurendra Reddy Katam <SK00524980@techmahindra.com>
Mon, 2 Apr 2018 05:08:36 +0000 (10:38 +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-MbRs32hFUzlqc5eM&resolved=false&severities=CRITICAL
Location:
src/main/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisher.java
Line No-778

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

index db982ec..2bb4e73 100644 (file)
@@ -775,7 +775,7 @@ public class MRSimplerBatchPublisher extends MRBaseClient implements MRBatchingP
                } catch (Exception x) {
 
                        getLog().warn(x.getMessage(), x);
-                       throw new Exception(x.getMessage());
+                       throw new IllegalArgumentException(x.getMessage());
                }
        }