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