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 f685eb7 FINERACT-822 enable VariableNameSameAsType warning
new 7a2d459 Merge pull request #972 from
percyashu/errorprone_variableNameSameAsType
f685eb7 is described below
commit f685eb7a689e644b37704f69f10823d520a0743f
Author: percyashu <[email protected]>
AuthorDate: Tue Jun 2 18:41:28 2020 +0100
FINERACT-822 enable VariableNameSameAsType warning
---
fineract-provider/build.gradle | 8 +++++---
.../infrastructure/jobs/service/JobRegisterServiceImpl.java | 4 ++--
.../organisation/workingdays/domain/RepaymentRescheduleType.java | 4 ++--
.../fineract/portfolio/collateral/api/CollateralsApiResource.java | 8 ++++----
.../DepositAccountInterestRateChartReadPlatformService.java | 4 ++--
.../shareproducts/service/ShareProductDividendAssembler.java | 8 ++++----
6 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle
index d67dce5..66700d1 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 47fd32f..f3dfdde 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 376ab23..8ee6555 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 6e9b8c7..2b70653 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<CodeValueData> 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 909d288..5dfe611 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 a7f808c..3e9e6fa 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<ShareAccountData> shareAccountDatas =
this.ShareAccountReadPlatformService.retrieveAllShareAccountDataForDividends(
+ Collection<ShareAccountData> shareAccountDatas =
this.shareAccountReadPlatformService.retrieveAllShareAccountDataForDividends(
productId,
product.getAllowDividendCalculationForInactiveClients(),
dividendPeriodStartDate);
if(shareAccountDatas == null || shareAccountDatas.isEmpty()) {
throw new ShareAccountsNotFoundException(product.getId()) ;