Skip to content

Commit

Permalink
Code fixes for new checkstyle rules
Browse files Browse the repository at this point in the history
  • Loading branch information
galovics committed Nov 25, 2023
1 parent 52acaf7 commit 3b46332
Show file tree
Hide file tree
Showing 15 changed files with 65 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public PageRequest toPageable() {

@Data
@SuppressWarnings({ "unused" })
private static class SortOrder {
private static final class SortOrder {

private Sort.Direction direction;
private String property;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void addListeners() {
new HandleLoanJournalEntryCreatedBusinessEvent());
}

private class HandleLoanJournalEntryCreatedBusinessEvent implements BusinessEventListener<LoanJournalEntryCreatedBusinessEvent> {
private final class HandleLoanJournalEntryCreatedBusinessEvent implements BusinessEventListener<LoanJournalEntryCreatedBusinessEvent> {

@Override
public void onBusinessEvent(LoanJournalEntryCreatedBusinessEvent event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void addListeners() {
new ExternalAssetOwnerLoanStatusChangedListener());
}

private class ExternalAssetOwnerLoanStatusChangedListener implements BusinessEventListener<LoanStatusChangedBusinessEvent> {
private final class ExternalAssetOwnerLoanStatusChangedListener implements BusinessEventListener<LoanStatusChangedBusinessEvent> {

@Override
public void onBusinessEvent(LoanStatusChangedBusinessEvent event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ private Predicate<LoanRepaymentScheduleInstallment> getFilterPredicate(PaymentAl
@AllArgsConstructor
@Getter
@Setter
private static class Balances {
private static final class Balances {

private Money aggregatedPrincipalPortion;
private Money aggregatedFeeChargesPortion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
public class ServerApplication extends SpringBootServletInitializer {

@Import({ FineractWebApplicationConfiguration.class, FineractLiquibaseOnlyApplicationConfiguration.class })
private static class Configuration {}
private static final class Configuration {}

@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void addListeners() {
new SendEmailOnLoanRepayment());
}

private class SendEmailOnLoanRepayment implements BusinessEventListener<LoanTransactionMakeRepaymentPostBusinessEvent> {
private final class SendEmailOnLoanRepayment implements BusinessEventListener<LoanTransactionMakeRepaymentPostBusinessEvent> {

@Override
public void onBusinessEvent(LoanTransactionMakeRepaymentPostBusinessEvent event) {
Expand All @@ -68,7 +68,7 @@ public void onBusinessEvent(LoanTransactionMakeRepaymentPostBusinessEvent event)
}
}

private class SendEmailOnLoanRejected implements BusinessEventListener<LoanRejectedBusinessEvent> {
private final class SendEmailOnLoanRejected implements BusinessEventListener<LoanRejectedBusinessEvent> {

@Override
public void onBusinessEvent(LoanRejectedBusinessEvent event) {
Expand All @@ -81,7 +81,7 @@ public void onBusinessEvent(LoanRejectedBusinessEvent event) {
}
}

private class SendEmailOnLoanApproved implements BusinessEventListener<LoanApprovedBusinessEvent> {
private final class SendEmailOnLoanApproved implements BusinessEventListener<LoanApprovedBusinessEvent> {

@Override
public void onBusinessEvent(LoanApprovedBusinessEvent event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ private HashMap<String, Object> processSavingsTransactionDataForSms(final Saving
return smsParams;
}

private class SendSmsOnLoanApproved implements BusinessEventListener<LoanApprovedBusinessEvent> {
private final class SendSmsOnLoanApproved implements BusinessEventListener<LoanApprovedBusinessEvent> {

@Override
public void onBusinessEvent(LoanApprovedBusinessEvent event) {
Expand All @@ -391,7 +391,7 @@ public void onBusinessEvent(LoanApprovedBusinessEvent event) {
}
}

private class SendSmsOnLoanRejected implements BusinessEventListener<LoanRejectedBusinessEvent> {
private final class SendSmsOnLoanRejected implements BusinessEventListener<LoanRejectedBusinessEvent> {

@Override
public void onBusinessEvent(LoanRejectedBusinessEvent event) {
Expand All @@ -400,55 +400,55 @@ public void onBusinessEvent(LoanRejectedBusinessEvent event) {
}
}

private class SendSmsOnLoanRepayment implements BusinessEventListener<LoanTransactionMakeRepaymentPostBusinessEvent> {
private final class SendSmsOnLoanRepayment implements BusinessEventListener<LoanTransactionMakeRepaymentPostBusinessEvent> {

@Override
public void onBusinessEvent(LoanTransactionMakeRepaymentPostBusinessEvent event) {
sendSmsForLoanRepayment(event.get());
}
}

private class ClientActivatedListener implements BusinessEventListener<ClientActivateBusinessEvent> {
private final class ClientActivatedListener implements BusinessEventListener<ClientActivateBusinessEvent> {

@Override
public void onBusinessEvent(ClientActivateBusinessEvent event) {
notifyClientActivated(event.get());
}
}

private class ClientRejectedListener implements BusinessEventListener<ClientRejectBusinessEvent> {
private final class ClientRejectedListener implements BusinessEventListener<ClientRejectBusinessEvent> {

@Override
public void onBusinessEvent(ClientRejectBusinessEvent event) {
notifyClientRejected(event.get());
}
}

private class SavingsAccountActivatedListener implements BusinessEventListener<SavingsActivateBusinessEvent> {
private final class SavingsAccountActivatedListener implements BusinessEventListener<SavingsActivateBusinessEvent> {

@Override
public void onBusinessEvent(SavingsActivateBusinessEvent event) {
notifySavingsAccountActivated(event.get());
}
}

private class SavingsAccountRejectedListener implements BusinessEventListener<SavingsRejectBusinessEvent> {
private final class SavingsAccountRejectedListener implements BusinessEventListener<SavingsRejectBusinessEvent> {

@Override
public void onBusinessEvent(SavingsRejectBusinessEvent event) {
notifySavingsAccountRejected(event.get());
}
}

private class DepositSavingsAccountTransactionListener implements BusinessEventListener<SavingsDepositBusinessEvent> {
private final class DepositSavingsAccountTransactionListener implements BusinessEventListener<SavingsDepositBusinessEvent> {

@Override
public void onBusinessEvent(SavingsDepositBusinessEvent event) {
sendSmsForSavingsTransaction(event.get(), true);
}
}

private class NonDepositSavingsAccountTransactionListener implements BusinessEventListener<SavingsWithdrawalBusinessEvent> {
private final class NonDepositSavingsAccountTransactionListener implements BusinessEventListener<SavingsWithdrawalBusinessEvent> {

@Override
public void onBusinessEvent(SavingsWithdrawalBusinessEvent event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void writeTo(T t, Class<?> type, Type genericType, Annotation[] annotatio
}

@RequiredArgsConstructor
private static class SimpleHttpOutputMessage implements HttpOutputMessage {
private static final class SimpleHttpOutputMessage implements HttpOutputMessage {

private final OutputStream outputStream;
private final HttpHeaders headers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public void addListeners() {
new ShareAccountApprovedListener());
}

private class ClientCreatedListener implements BusinessEventListener<ClientCreateBusinessEvent> {
private final class ClientCreatedListener implements BusinessEventListener<ClientCreateBusinessEvent> {

@Override
public void onBusinessEvent(ClientCreateBusinessEvent event) {
Expand All @@ -106,7 +106,7 @@ public void onBusinessEvent(ClientCreateBusinessEvent event) {
}
}

private class CenterCreatedListener implements BusinessEventListener<CentersCreateBusinessEvent> {
private final class CenterCreatedListener implements BusinessEventListener<CentersCreateBusinessEvent> {

@Override
public void onBusinessEvent(CentersCreateBusinessEvent event) {
Expand All @@ -116,7 +116,7 @@ public void onBusinessEvent(CentersCreateBusinessEvent event) {
}
}

private class GroupCreatedListener implements BusinessEventListener<GroupsCreateBusinessEvent> {
private final class GroupCreatedListener implements BusinessEventListener<GroupsCreateBusinessEvent> {

@Override
public void onBusinessEvent(GroupsCreateBusinessEvent event) {
Expand All @@ -126,7 +126,7 @@ public void onBusinessEvent(GroupsCreateBusinessEvent event) {
}
}

private class SavingsAccountDepositListener implements BusinessEventListener<SavingsDepositBusinessEvent> {
private final class SavingsAccountDepositListener implements BusinessEventListener<SavingsDepositBusinessEvent> {

@Override
public void onBusinessEvent(SavingsDepositBusinessEvent event) {
Expand All @@ -137,7 +137,7 @@ public void onBusinessEvent(SavingsDepositBusinessEvent event) {
}
}

private class ShareProductDividendCreatedListener implements BusinessEventListener<ShareProductDividentsCreateBusinessEvent> {
private final class ShareProductDividendCreatedListener implements BusinessEventListener<ShareProductDividentsCreateBusinessEvent> {

@Override
public void onBusinessEvent(ShareProductDividentsCreateBusinessEvent event) {
Expand All @@ -147,7 +147,7 @@ public void onBusinessEvent(ShareProductDividentsCreateBusinessEvent event) {
}
}

private class FixedDepositAccountCreatedListener implements BusinessEventListener<FixedDepositAccountCreateBusinessEvent> {
private final class FixedDepositAccountCreatedListener implements BusinessEventListener<FixedDepositAccountCreateBusinessEvent> {

@Override
public void onBusinessEvent(FixedDepositAccountCreateBusinessEvent event) {
Expand All @@ -157,7 +157,8 @@ public void onBusinessEvent(FixedDepositAccountCreateBusinessEvent event) {
}
}

private class RecurringDepositAccountCreatedListener implements BusinessEventListener<RecurringDepositAccountCreateBusinessEvent> {
private final class RecurringDepositAccountCreatedListener
implements BusinessEventListener<RecurringDepositAccountCreateBusinessEvent> {

@Override
public void onBusinessEvent(RecurringDepositAccountCreateBusinessEvent event) {
Expand All @@ -168,7 +169,7 @@ public void onBusinessEvent(RecurringDepositAccountCreateBusinessEvent event) {
}
}

private class SavingsAccountApprovedListener implements BusinessEventListener<SavingsApproveBusinessEvent> {
private final class SavingsAccountApprovedListener implements BusinessEventListener<SavingsApproveBusinessEvent> {

@Override
public void onBusinessEvent(SavingsApproveBusinessEvent event) {
Expand All @@ -189,7 +190,7 @@ public void onBusinessEvent(SavingsApproveBusinessEvent event) {
}
}

private class SavingsPostInterestListener implements BusinessEventListener<SavingsPostInterestBusinessEvent> {
private final class SavingsPostInterestListener implements BusinessEventListener<SavingsPostInterestBusinessEvent> {

@Override
public void onBusinessEvent(SavingsPostInterestBusinessEvent event) {
Expand All @@ -199,7 +200,7 @@ public void onBusinessEvent(SavingsPostInterestBusinessEvent event) {
}
}

private class LoanCreatedListener implements BusinessEventListener<LoanCreatedBusinessEvent> {
private final class LoanCreatedListener implements BusinessEventListener<LoanCreatedBusinessEvent> {

@Override
public void onBusinessEvent(LoanCreatedBusinessEvent event) {
Expand All @@ -209,7 +210,7 @@ public void onBusinessEvent(LoanCreatedBusinessEvent event) {
}
}

private class LoanApprovedListener implements BusinessEventListener<LoanApprovedBusinessEvent> {
private final class LoanApprovedListener implements BusinessEventListener<LoanApprovedBusinessEvent> {

@Override
public void onBusinessEvent(LoanApprovedBusinessEvent event) {
Expand All @@ -219,7 +220,7 @@ public void onBusinessEvent(LoanApprovedBusinessEvent event) {
}
}

private class LoanClosedListener implements BusinessEventListener<LoanCloseBusinessEvent> {
private final class LoanClosedListener implements BusinessEventListener<LoanCloseBusinessEvent> {

@Override
public void onBusinessEvent(LoanCloseBusinessEvent event) {
Expand All @@ -229,7 +230,7 @@ public void onBusinessEvent(LoanCloseBusinessEvent event) {
}
}

private class LoanCloseAsRescheduledListener implements BusinessEventListener<LoanCloseAsRescheduleBusinessEvent> {
private final class LoanCloseAsRescheduledListener implements BusinessEventListener<LoanCloseAsRescheduleBusinessEvent> {

@Override
public void onBusinessEvent(LoanCloseAsRescheduleBusinessEvent event) {
Expand All @@ -239,7 +240,7 @@ public void onBusinessEvent(LoanCloseAsRescheduleBusinessEvent event) {
}
}

private class LoanChargebackTransactionListener implements BusinessEventListener<LoanChargebackTransactionBusinessEvent> {
private final class LoanChargebackTransactionListener implements BusinessEventListener<LoanChargebackTransactionBusinessEvent> {

@Override
public void onBusinessEvent(LoanChargebackTransactionBusinessEvent event) {
Expand All @@ -252,7 +253,7 @@ public void onBusinessEvent(LoanChargebackTransactionBusinessEvent event) {
}
}

private class LoanMakeRepaymentListener implements BusinessEventListener<LoanTransactionMakeRepaymentPostBusinessEvent> {
private final class LoanMakeRepaymentListener implements BusinessEventListener<LoanTransactionMakeRepaymentPostBusinessEvent> {

@Override
public void onBusinessEvent(LoanTransactionMakeRepaymentPostBusinessEvent event) {
Expand All @@ -262,7 +263,7 @@ public void onBusinessEvent(LoanTransactionMakeRepaymentPostBusinessEvent event)
}
}

private class LoanProductCreatedListener implements BusinessEventListener<LoanProductCreateBusinessEvent> {
private final class LoanProductCreatedListener implements BusinessEventListener<LoanProductCreateBusinessEvent> {

@Override
public void onBusinessEvent(LoanProductCreateBusinessEvent event) {
Expand All @@ -272,7 +273,7 @@ public void onBusinessEvent(LoanProductCreateBusinessEvent event) {
}
}

private class SavingsAccountCreatedListener implements BusinessEventListener<SavingsCreateBusinessEvent> {
private final class SavingsAccountCreatedListener implements BusinessEventListener<SavingsCreateBusinessEvent> {

@Override
public void onBusinessEvent(SavingsCreateBusinessEvent event) {
Expand All @@ -282,7 +283,7 @@ public void onBusinessEvent(SavingsCreateBusinessEvent event) {
}
}

private class SavingsAccountClosedListener implements BusinessEventListener<SavingsCloseBusinessEvent> {
private final class SavingsAccountClosedListener implements BusinessEventListener<SavingsCloseBusinessEvent> {

@Override
public void onBusinessEvent(SavingsCloseBusinessEvent event) {
Expand All @@ -292,7 +293,7 @@ public void onBusinessEvent(SavingsCloseBusinessEvent event) {
}
}

private class ShareAccountCreatedListener implements BusinessEventListener<ShareAccountCreateBusinessEvent> {
private final class ShareAccountCreatedListener implements BusinessEventListener<ShareAccountCreateBusinessEvent> {

@Override
public void onBusinessEvent(ShareAccountCreateBusinessEvent event) {
Expand All @@ -302,7 +303,7 @@ public void onBusinessEvent(ShareAccountCreateBusinessEvent event) {
}
}

private class ShareAccountApprovedListener implements BusinessEventListener<ShareAccountApproveBusinessEvent> {
private final class ShareAccountApprovedListener implements BusinessEventListener<ShareAccountApproveBusinessEvent> {

@Override
public void onBusinessEvent(ShareAccountApproveBusinessEvent event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ public String getJournalData(@PathParam("tellerId") @Parameter(description = "te
return this.jsonSerializer.serialize(journals);
}

private static class CashiersForTeller {
private static final class CashiersForTeller {

public Long tellerId;
public String tellerName;
Expand Down
Loading

0 comments on commit 3b46332

Please sign in to comment.