FINERACT-822 enable VariableNameSameAsType warning

This commit is contained in:
percyashu
2020-06-02 21:34:12 +01:00
parent bdb979e8ce
commit f685eb7a68
6 changed files with 19 additions and 17 deletions
+5 -3
View File
@@ -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",
@@ -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;
}
}
@@ -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() {
@@ -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);
}
}
}
@@ -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();
}
}
@@ -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()) ;