FINERACT-822 Enabling MultiVariableDeclaration check (#981)

This commit is contained in:
Percy Ayuk Ashu
2020-06-05 10:28:00 +01:00
committed by GitHub
parent 99b0136f40
commit 78857bcf81
14 changed files with 51 additions and 24 deletions
+2 -2
View File
@@ -338,6 +338,8 @@ tasks.withType(JavaCompile) {
"ThreeLetterTimeZoneID",
"VariableNameSameAsType",
"UnnecessaryParentheses",
"MultipleTopLevelClasses",
"MultiVariableDeclaration",
"AssertEqualsArgumentOrderChecker",
// "ReturnMissingNullable",
// "InconsistentOverloads",
@@ -346,8 +348,6 @@ tasks.withType(JavaCompile) {
// "ConstantField",
// "EmptySetMultibindingContributions",
// "MixedArrayDimensions",
// "MultipleTopLevelClasses",
// "MultiVariableDeclaration",
// "PackageLocation",
// "PrivateConstructorForNoninstantiableModule",
// "UnnecessaryStaticImport",
@@ -46,11 +46,20 @@ public class LoanWithWaiveInterestAndWriteOffIntegrationTest {
private ResponseSpecification responseSpec;
private RequestSpecification requestSpec;
private final String LP_PRINCIPAL = "12,000.00", LP_REPAYMENTS = "2", LP_REPAYMENT_PERIOD = "6", LP_INTEREST_RATE = "1",
PRINCIPAL = "4,500.00", LOAN_TERM_FREQUENCY = "18", NUMBER_OF_REPAYMENTS = "9", REPAYMENT_PERIOD = "2",
DISBURSEMENT_DATE = "30 October 2010", LOAN_APPLICATION_SUBMISSION_DATE = "23 September 2010",
EXPECTED_DISBURSAL_DATE = "28 October 2010", RATE_OF_INTEREST_PER_PERIOD = "2", DATE_OF_JOINING = "04 March 2009",
INTEREST_VALUE_AMOUNT = "40.00";
private final String LP_PRINCIPAL = "12,000.00";
private final String LP_REPAYMENTS = "2";
private final String LP_REPAYMENT_PERIOD = "6";
private final String LP_INTEREST_RATE = "1";
private final String PRINCIPAL = "4,500.00";
private final String LOAN_TERM_FREQUENCY = "18";
private final String NUMBER_OF_REPAYMENTS = "9";
private final String REPAYMENT_PERIOD = "2";
private final String DISBURSEMENT_DATE = "30 October 2010";
private final String LOAN_APPLICATION_SUBMISSION_DATE = "23 September 2010";
private final String EXPECTED_DISBURSAL_DATE = "28 October 2010";
private final String RATE_OF_INTEREST_PER_PERIOD = "2";
private final String DATE_OF_JOINING = "04 March 2009";
private final String INTEREST_VALUE_AMOUNT = "40.00";
private LoanTransactionHelper loanTransactionHelper;
@Before
@@ -64,7 +64,9 @@ public class CenterSheetPopulator extends AbstractWorkbookPopulator {
}
private void populateCentersByOfficeName(Sheet centerSheet) {
int rowIndex = 1, officeIndex = 0, startIndex = 1;
int rowIndex = 1;
int officeIndex = 0;
int startIndex = 1;
officeNameToBeginEndIndexesOfCenters = new HashMap<Integer, Integer[]>();
Row row = centerSheet.createRow(rowIndex);
for (OfficeData office : offices) {
@@ -120,4 +122,4 @@ public class CenterSheetPopulator extends AbstractWorkbookPopulator {
return officeNameToBeginEndIndexesOfCenters;
}
}
}
@@ -105,7 +105,9 @@ public class ClientSheetPopulator extends AbstractWorkbookPopulator {
}
private void populateClientsByOfficeName(Sheet clientSheet) {
int rowIndex = 1, startIndex = 1, officeIndex = 0;
int rowIndex = 1;
int startIndex = 1;
int officeIndex = 0;
officeNameToBeginEndIndexesOfClients = new HashMap<>();
Row row = clientSheet.createRow(rowIndex);
for (OfficeData office : officesDataList) {
@@ -143,4 +145,4 @@ public class ClientSheetPopulator extends AbstractWorkbookPopulator {
public Map<String, Long> getClientNameToSavingsAccountIds() {
return clientNameToSavingsAccountIds;
}
}
}
@@ -84,7 +84,9 @@ public class GroupSheetPopulator extends AbstractWorkbookPopulator {
officeToGroups.put(key, values);
}
private void populateGroupsByOfficeName(Sheet groupSheet) {
int rowIndex = 1, officeIndex = 0, startIndex = 1;
int rowIndex = 1;
int officeIndex = 0;
int startIndex = 1;
officeNameToBeginEndIndexesOfGroups = new HashMap<>();
Row row = groupSheet.createRow(rowIndex);
for(OfficeData office : offices) {
@@ -124,4 +126,4 @@ public class GroupSheetPopulator extends AbstractWorkbookPopulator {
groupNameToGroupId.put(group.getName().trim(), group.getId());
}
}
}
}
@@ -72,7 +72,9 @@ public class PersonnelSheetPopulator extends AbstractWorkbookPopulator {
private void populateStaffByOfficeName(Sheet staffSheet) {
int rowIndex = 1, startIndex = 1, officeIndex = 0;
int rowIndex = 1;
int startIndex = 1;
int officeIndex = 0;
officeNameToBeginEndIndexesOfStaff = new HashMap<>();
Row row = staffSheet.createRow(rowIndex);
for (OfficeData office : offices) {
@@ -129,4 +131,4 @@ public class PersonnelSheetPopulator extends AbstractWorkbookPopulator {
return officeNameToBeginEndIndexesOfStaff;
}
}
}
@@ -174,7 +174,9 @@ public class ChartOfAccountsWorkbook extends AbstractWorkbookPopulator {
accountTypesNoDuplicatesList.add(glAccounts.get(i).getType().getValue());
}
}
int rowIndex=1,startIndex=1,accountTypeIndex=0;
int rowIndex = 1;
int startIndex = 1;
int accountTypeIndex = 0;
accountTypeToBeginEndIndexesofAccountNames= new HashMap<Integer,Integer[]>();
for (String accountType: accountTypesNoDuplicatesList) {
startIndex=rowIndex+1;
@@ -146,7 +146,8 @@ public class FixedDepositTransactionWorkbookPopulator extends AbstractWorkbookPo
HashMap<String, Integer[]> clientNameToBeginEndIndexes = new HashMap<>();
ArrayList<String> clientsWithActiveSavings = new ArrayList<>();
ArrayList<Long> clientIdsWithActiveSavings = new ArrayList<>();
int startIndex = 1, endIndex = 1;
int startIndex = 1;
int endIndex = 1;
String clientName = "";
Long clientId = null;
for(int i = 0; i < savingsAccounts.size(); i++){
@@ -260,7 +260,8 @@ public class GuarantorWorkbookPopulator extends AbstractWorkbookPopulator {
HashMap<String, Integer[]> clientNameToBeginEndIndexes = new HashMap<String, Integer[]>();
ArrayList<String> clientsWithActiveLoans = new ArrayList<String>();
ArrayList<String> clientIdsWithActiveLoans = new ArrayList<String>();
int startIndex = 1, endIndex = 1;
int startIndex = 1;
int endIndex = 1;
String clientName = "";
String clientId = "";
for(int i = 0; i < loans.size(); i++){
@@ -317,4 +318,4 @@ public class GuarantorWorkbookPopulator extends AbstractWorkbookPopulator {
}
}
}
@@ -191,7 +191,8 @@ public class LoanRepaymentWorkbookPopulator extends AbstractWorkbookPopulator {
HashMap<String, Integer[]> clientNameToBeginEndIndexes = new HashMap<String, Integer[]>();
ArrayList<String> clientsWithActiveLoans = new ArrayList<String>();
ArrayList<String> clientIdsWithActiveLoans = new ArrayList<String>();
int startIndex = 1, endIndex = 1;
int startIndex = 1;
int endIndex = 1;
String clientName = "";
String clientId = "";
for (int i = 0; i < allloans.size(); i++) {
@@ -149,7 +149,8 @@ public class RecurringDepositTransactionWorkbookPopulator extends AbstractWorkbo
HashMap<String, Integer[]> clientNameToBeginEndIndexes = new HashMap<>();
ArrayList<String> clientsWithActiveSavings = new ArrayList<>();
ArrayList<Long> clientIdsWithActiveSavings = new ArrayList<>();
int startIndex = 1, endIndex = 1;
int startIndex = 1;
int endIndex = 1;
String clientName = "";
Long clientId = null;
for(int i = 0; i < savingsAccounts.size(); i++){
@@ -146,7 +146,8 @@ public class SavingsTransactionsWorkbookPopulator extends AbstractWorkbookPopula
HashMap<String, Integer[]> clientNameToBeginEndIndexes = new HashMap<>();
ArrayList<String> clientsWithActiveSavings = new ArrayList<>();
ArrayList<Long> clientIdsWithActiveSavings = new ArrayList<>();
int startIndex = 1, endIndex = 1;
int startIndex = 1;
int endIndex = 1;
String clientName = "";
Long clientId = null;
for(int i = 0; i < savingsAccounts.size(); i++){
@@ -386,7 +386,9 @@ public class Sender {
+ attempt + " attempts");
}
// calculate summary
int success = 0, failure = 0, canonicalIds = 0;
int success = 0;
int failure = 0;
int canonicalIds = 0;
for (Result result : results.values()) {
if (result.getMessageId() != null) {
success++;
@@ -1313,7 +1313,8 @@ public void checkForProductMixRestrictions(final Loan loan) {
CommandProcessingResult result=null;
int count=0,j=0;
int count = 0;
int j = 0;
for(JsonElement approvals:approvalFormData)
{