diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle index 21ef08730..06736eb4e 100644 --- a/fineract-provider/build.gradle +++ b/fineract-provider/build.gradle @@ -303,8 +303,8 @@ tasks.withType(JavaCompile) { options.errorprone { disableWarningsInGeneratedCode = true //Todo Remove necessary checks from this list - disable("UnusedVariable", - "VariableNameSameAsType", + disable( + "UnusedVariable", "InconsistentCapitalization", "UnnecessaryParentheses", "ClassCanBeStatic", @@ -333,10 +333,12 @@ tasks.withType(JavaCompile) { "OperatorPrecedence" ) //TODO gradually enable these checks - error( "DefaultCharset", + error( + "DefaultCharset", "RemoveUnusedImports", "WaitNotInLoop", "ThreeLetterTimeZoneID", + "VariableNameSameAsType", // "ReturnMissingNullable", // "InconsistentOverloads", // "MethodCanBeStatic", diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterServiceImpl.java index 47fd32fb5..f3dfdde3b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterServiceImpl.java @@ -432,7 +432,7 @@ public class JobRegisterServiceImpl implements JobRegisterService, ApplicationLi private JobKey constructJobKey(final String Key) { final String[] keyParams = Key.split(SchedulerServiceConstants.JOB_KEY_SEPERATOR); - final JobKey JobKey = new JobKey(keyParams[0], keyParams[1]); - return JobKey; + final JobKey jobKey = new JobKey(keyParams[0], keyParams[1]); + return jobKey; } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/domain/RepaymentRescheduleType.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/domain/RepaymentRescheduleType.java index 376ab2339..8ee6555b1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/domain/RepaymentRescheduleType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/domain/RepaymentRescheduleType.java @@ -70,8 +70,8 @@ public enum RepaymentRescheduleType { } public static RepaymentRescheduleType fromInt(final int i) { - final RepaymentRescheduleType RepaymentRescheduleType = intToEnumMap.get(Integer.valueOf(i)); - return RepaymentRescheduleType; + final RepaymentRescheduleType repaymentRescheduleType = intToEnumMap.get(Integer.valueOf(i)); + return repaymentRescheduleType; } public static int getMinValue() { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/api/CollateralsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/api/CollateralsApiResource.java index 6e9b8c7f0..2b7065367 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/api/CollateralsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/api/CollateralsApiResource.java @@ -137,16 +137,16 @@ public class CollateralsApiResource { @PathParam("collateralId") @ApiParam(value = "collateralId") final Long CollateralId) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermission); - CollateralData CollateralData = this.collateralReadPlatformService.retrieveCollateral(loanId, CollateralId); + CollateralData collateralData = this.collateralReadPlatformService.retrieveCollateral(loanId, CollateralId); final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters()); if (settings.isTemplate()) { final Collection codeValues = this.codeValueReadPlatformService .retrieveCodeValuesByCode(CollateralApiConstants.COLLATERAL_CODE_NAME); - CollateralData = CollateralData.template(CollateralData, codeValues); + collateralData = collateralData.template(collateralData, codeValues); } - return this.apiJsonSerializerService.serialize(settings, CollateralData, RESPONSE_DATA_PARAMETERS); + return this.apiJsonSerializerService.serialize(settings, collateralData, RESPONSE_DATA_PARAMETERS); } @POST @@ -194,4 +194,4 @@ public class CollateralsApiResource { return this.apiJsonSerializerService.serialize(result); } -} \ No newline at end of file +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountInterestRateChartReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountInterestRateChartReadPlatformService.java index 909d2881c..5dfe61152 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountInterestRateChartReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountInterestRateChartReadPlatformService.java @@ -26,9 +26,9 @@ public interface DepositAccountInterestRateChartReadPlatformService { DepositAccountInterestRateChartData retrieveOneWithSlabs(Long interestChartId); - DepositAccountInterestRateChartData retrieveWithTemplate(DepositAccountInterestRateChartData DepositAccountInterestRateChartData); + DepositAccountInterestRateChartData retrieveWithTemplate(DepositAccountInterestRateChartData depositAccountInterestRateChartData); DepositAccountInterestRateChartData retrieveOneWithSlabsOnAccountId(Long accountId); DepositAccountInterestRateChartData template(); -} \ No newline at end of file +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductDividendAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductDividendAssembler.java index a7f808c76..3e9e6fa0f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductDividendAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductDividendAssembler.java @@ -42,13 +42,13 @@ import org.springframework.stereotype.Component; public class ShareProductDividendAssembler { private final ProductReadPlatformService shareProductReadPlatformService; - private final ShareAccountReadPlatformService ShareAccountReadPlatformService; + private final ShareAccountReadPlatformService shareAccountReadPlatformService; @Autowired public ShareProductDividendAssembler(final ShareProductReadPlatformServiceImpl shareProductReadPlatformService, - final ShareAccountReadPlatformService ShareAccountReadPlatformService) { + final ShareAccountReadPlatformService shareAccountReadPlatformService) { this.shareProductReadPlatformService = shareProductReadPlatformService; - this.ShareAccountReadPlatformService = ShareAccountReadPlatformService; + this.shareAccountReadPlatformService = shareAccountReadPlatformService; } public ShareProductDividendPayOutDetails calculateDividends(final Long productId, final BigDecimal amount, @@ -57,7 +57,7 @@ public class ShareProductDividendAssembler { ShareProductData product = (ShareProductData) this.shareProductReadPlatformService.retrieveOne(productId, false); MonetaryCurrency currency = new MonetaryCurrency(product.getCurrency().code(), product.getCurrency().decimalPlaces(), product .getCurrency().currencyInMultiplesOf()); - Collection shareAccountDatas = this.ShareAccountReadPlatformService.retrieveAllShareAccountDataForDividends( + Collection shareAccountDatas = this.shareAccountReadPlatformService.retrieveAllShareAccountDataForDividends( productId, product.getAllowDividendCalculationForInactiveClients(), dividendPeriodStartDate); if(shareAccountDatas == null || shareAccountDatas.isEmpty()) { throw new ShareAccountsNotFoundException(product.getId()) ;