FINERACT-821 Added and Enforced upperEll checkstyle

This commit is contained in:
Manthan Surkar
2020-05-26 09:30:59 +02:00
committed by Michael Vorburger ⛑️
parent e928c6487f
commit 01e8014ea2
12 changed files with 17 additions and 16 deletions
@@ -86,6 +86,7 @@
<property name="allowByTailComment" value="true"/>
<property name="allowNonPrintableEscapes" value="true"/>
</module>
<module name="UpperEll"/>
<!-- TODO Enable many more checks (go about this one by one, step by step, raise separate PRs fixing and then enforcing):
<module name="HiddenField">
@@ -147,7 +148,7 @@
<module name="ArrayTypeStyle"/>
<module name="MissingSwitchDefault"/>
<module name="FallThrough"/>
<module name="UpperEll"/>
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>
<module name="EmptyLineSeparator">
@@ -69,7 +69,7 @@ public class IPv4Helper {
*/
public static String longToIpAddress(long ip) {
// if ip is bigger than 255.255.255.255 or smaller than 0.0.0.0
if (ip > 4294967295l || ip < 0) {
if (ip > 4294967295L || ip < 0) {
throw new IllegalArgumentException("invalid ip");
}
@@ -251,7 +251,7 @@ public class GroupGeneralData implements Serializable {
this.externalId = externalId;
this.status = status;
if (status != null) {
this.active = status.getId().equals(300l);
this.active = status.getId().equals(300L);
} else {
this.active = null;
}
@@ -23,9 +23,9 @@ import java.util.Map;
public enum GroupTypes {
INVALID(0l, "lendingStrategy.invalid", "invalid"), //
CENTER(1l, "groupTypes.center", "center"), //
GROUP(2l, "groupTypes.group", "group"); //
INVALID(0L, "lendingStrategy.invalid", "invalid"), //
CENTER(1L, "groupTypes.center", "center"), //
GROUP(2L, "groupTypes.group", "group"); //
private Long id;
private String code;
@@ -623,7 +623,7 @@ public class LoanCharge extends AbstractPersistableCustom {
if (isGreaterThanZero(value)) {
final MathContext mc = new MathContext(8, MoneyHelper.getRoundingMode());
final BigDecimal multiplicand = percentage.divide(BigDecimal.valueOf(100l), mc);
final BigDecimal multiplicand = percentage.divide(BigDecimal.valueOf(100L), mc);
percentageOf = value.multiply(multiplicand, mc);
}
return percentageOf;
@@ -182,7 +182,7 @@ public class FixedDepositAccount extends SavingsAccount {
}
this.nominalAnnualInterestRate = applicableInterestRate;
return applicableInterestRate.divide(BigDecimal.valueOf(100l), mc);
return applicableInterestRate.divide(BigDecimal.valueOf(100L), mc);
}
public void updateMaturityDateAndAmountBeforeAccountActivation(final MathContext mc, final boolean isPreMatureClosure,
@@ -235,7 +235,7 @@ public class RecurringDepositAccount extends SavingsAccount {
this.nominalAnnualInterestRate = applicableInterestRate;
return applicableInterestRate.divide(BigDecimal.valueOf(100l), mc);
return applicableInterestRate.divide(BigDecimal.valueOf(100L), mc);
}
public void updateMaturityDateAndAmount(final MathContext mc, final boolean isPreMatureClosure,
@@ -782,12 +782,12 @@ public class SavingsAccount extends AbstractPersistableCustom {
}
private BigDecimal getEffectiveOverdraftInterestRateAsFraction(MathContext mc) {
return this.nominalAnnualInterestRateOverdraft.divide(BigDecimal.valueOf(100l), mc);
return this.nominalAnnualInterestRateOverdraft.divide(BigDecimal.valueOf(100L), mc);
}
@SuppressWarnings("unused")
protected BigDecimal getEffectiveInterestRateAsFraction(final MathContext mc, final LocalDate upToInterestCalculationDate) {
return this.nominalAnnualInterestRate.divide(BigDecimal.valueOf(100l), mc);
return this.nominalAnnualInterestRate.divide(BigDecimal.valueOf(100L), mc);
}
protected List<SavingsAccountTransaction> retreiveOrderedNonInterestPostingTransactions() {
@@ -544,7 +544,7 @@ public class SavingsAccountCharge extends AbstractPersistableCustom {
if (isGreaterThanZero(value)) {
final MathContext mc = new MathContext(8, MoneyHelper.getRoundingMode());
final BigDecimal multiplicand = percentage.divide(BigDecimal.valueOf(100l), mc);
final BigDecimal multiplicand = percentage.divide(BigDecimal.valueOf(100L), mc);
percentageOf = value.multiply(multiplicand, mc);
}
@@ -238,7 +238,7 @@ public class ShareAccountCharge extends AbstractPersistableCustom {
BigDecimal percentageOf = BigDecimal.ZERO;
if (isGreaterThanZero(value)) {
final MathContext mc = new MathContext(8, MoneyHelper.getRoundingMode());
final BigDecimal multiplicand = percentage.divide(BigDecimal.valueOf(100l), mc);
final BigDecimal multiplicand = percentage.divide(BigDecimal.valueOf(100L), mc);
percentageOf = value.multiply(multiplicand, mc);
}
return percentageOf;
@@ -341,7 +341,7 @@ public class ShareAccountCharge extends AbstractPersistableCustom {
if (ChargeCalculationType.fromInt(this.chargeCalculation).isFlat()) {
amountPaybale = this.amount;
} else if (ChargeCalculationType.fromInt(this.chargeCalculation).isPercentageOfAmount()) {
amountPaybale = transactionAmount.multiply(this.percentage).divide(BigDecimal.valueOf(100l));
amountPaybale = transactionAmount.multiply(this.percentage).divide(BigDecimal.valueOf(100L));
}
this.amountOutstanding = amountPaybale;
return amountPaybale;
@@ -326,7 +326,7 @@ public class ScheduledJobRunnerServiceImpl implements ScheduledJobRunnerService
for (Map<String, Object> details : scheduleDetails) {
Long count = (Long) details.get("futureInstallemts");
if (count == null) {
count = 0l;
count = 0L;
}
final Long savingsId = (Long) details.get("savingsId");
final BigDecimal amount = (BigDecimal) details.get("amount");
@@ -61,7 +61,7 @@ public class XBRLBuilderTest {
public void setUp() {
this.readNamespaceService = Mockito.mock(NamespaceReadPlatformServiceImpl.class);
lenient().when(this.readNamespaceService.retrieveNamespaceByPrefix(ArgumentMatchers.anyString()))
.thenReturn(new NamespaceData(1l, "mockedprefix", "mockedurl"));
.thenReturn(new NamespaceData(1L, "mockedprefix", "mockedurl"));
}
@Test