You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by vo...@apache.org on 2020/06/11 19:36:51 UTC

[fineract] branch develop updated: FINERACT-942 Added and Enforced IllegalThrows checkstyle

This is an automated email from the ASF dual-hosted git repository.

vorburger pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
     new a582ec6  FINERACT-942 Added and Enforced IllegalThrows checkstyle
a582ec6 is described below

commit a582ec63eeb39f6fbab398d42a21f1aeb17676b7
Author: thesmallstar <ma...@gmail.com>
AuthorDate: Thu Jun 11 03:29:19 2020 +0530

    FINERACT-942 Added and Enforced IllegalThrows checkstyle
---
 fineract-provider/config/checkstyle/checkstyle.xml                | 3 ++-
 .../apache/fineract/interoperation/api/InteropApiResource.java    | 8 ++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/fineract-provider/config/checkstyle/checkstyle.xml b/fineract-provider/config/checkstyle/checkstyle.xml
index b198f2f..e7e3ef4 100644
--- a/fineract-provider/config/checkstyle/checkstyle.xml
+++ b/fineract-provider/config/checkstyle/checkstyle.xml
@@ -57,6 +57,7 @@
         </module>
         <module name="EqualsHashCode"/>
         <module name="FallThrough"/>
+        <module name="IllegalThrows" />
         <module name="RedundantImport"/>
         <module name="UnusedImports"/>
         <module name="AvoidStarImport"/>
@@ -125,7 +126,7 @@
 
         < ! - - TODO Checks for Exception Handling Anti-Patterns - - >
         <module name="IllegalCatch"/>
-        <module name="IllegalThrows" />
+
         <module name="MutableException"/>
         <module name="com.github.sevntu.checkstyle.checks.coding.AvoidHidingCauseExceptionCheck" />
 
diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/api/InteropApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/api/InteropApiResource.java
index 6144148..2a45d4c 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/api/InteropApiResource.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/api/InteropApiResource.java
@@ -194,7 +194,7 @@ public class InteropApiResource {
     public String registerAccountIdentifier(@PathParam("idType") @ApiParam(value = "idType") InteropIdentifierType idType,
                                             @PathParam("idValue") @ApiParam(value = "idValue") String idValue,
                                             @ApiParam(hidden = true) String identifierJson, @Context UriInfo uriInfo)
-            throws Throwable {
+                        {
         CommandWrapper commandRequest = new InteropWrapperBuilder().registerAccountIdentifier(idType, idValue, null).withJson(identifierJson).build();
 
         InteropIdentifierAccountResponseData result = (InteropIdentifierAccountResponseData) commandsSourceService.logCommandSource(commandRequest);
@@ -215,7 +215,7 @@ public class InteropApiResource {
                                             @PathParam("idValue") @ApiParam(value = "idValue") String idValue,
                                             @PathParam("subIdOrType") @ApiParam(value = "subIdOrType") String subIdOrType,
                                             @ApiParam(hidden = true) String identifierJson, @Context UriInfo uriInfo)
-            throws Throwable {
+                         {
         CommandWrapper commandRequest = new InteropWrapperBuilder().registerAccountIdentifier(idType, idValue, subIdOrType).withJson(identifierJson).build();
 
         InteropIdentifierAccountResponseData result = (InteropIdentifierAccountResponseData) commandsSourceService.logCommandSource(commandRequest);
@@ -235,7 +235,7 @@ public class InteropApiResource {
     public String deleteAccountIdentifier(@PathParam("idType") @ApiParam(value = "idType") InteropIdentifierType idType,
                                           @PathParam("idValue") @ApiParam(value = "idValue") String idValue,
                                           @Context UriInfo uriInfo)
-            throws Throwable {
+                         {
         CommandWrapper commandRequest = new InteropWrapperBuilder().deleteAccountIdentifier(idType, idValue, null).build();
 
         InteropIdentifierAccountResponseData result = (InteropIdentifierAccountResponseData) commandsSourceService.logCommandSource(commandRequest);
@@ -256,7 +256,7 @@ public class InteropApiResource {
                                           @PathParam("idValue") @ApiParam(value = "idValue") String idValue,
                                           @PathParam("subIdOrType") @ApiParam(value = "subIdOrType") String subIdOrType,
                                           @Context UriInfo uriInfo)
-            throws Throwable {
+                           {
         CommandWrapper commandRequest = new InteropWrapperBuilder().deleteAccountIdentifier(idType, idValue, subIdOrType).build();
 
         InteropIdentifierAccountResponseData result = (InteropIdentifierAccountResponseData) commandsSourceService.logCommandSource(commandRequest);