From 3b46332443af27747632c1c39337aad7ccc20c14 Mon Sep 17 00:00:00 2001 From: Arnold Galovics Date: Sat, 25 Nov 2023 18:48:05 +0100 Subject: [PATCH] Code fixes for new checkstyle rules --- .../core/service/PagedRequest.java | 2 +- ...rnalAssetOwnerJournalEntryServiceImpl.java | 2 +- ...erLoanStatusChangePlatformServiceImpl.java | 2 +- ...edPaymentScheduleTransactionProcessor.java | 2 +- .../apache/fineract/ServerApplication.java | 2 +- .../EmailCampaignDomainServiceImpl.java | 6 +-- .../service/SmsCampaignDomainServiceImpl.java | 18 ++++---- .../JerseyJacksonObjectArgumentHandler.java | 2 +- .../NotificationDomainServiceImpl.java | 41 ++++++++++--------- .../teller/api/TellerApiResource.java | 2 +- .../service/GuarantorDomainServiceImpl.java | 16 ++++---- .../service/LoanArrearsAgingServiceImpl.java | 28 ++++++------- .../LoanStatusChangePlatformServiceImpl.java | 2 +- .../template/service/TrustModifier.java | 2 +- .../BusinessEventNotifierServiceImplTest.java | 2 +- 15 files changed, 65 insertions(+), 64 deletions(-) diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/PagedRequest.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/PagedRequest.java index 12c3ff881d9..e2becbb50d5 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/PagedRequest.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/PagedRequest.java @@ -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; diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerJournalEntryServiceImpl.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerJournalEntryServiceImpl.java index 14d8e93987c..dcd41fcb2b4 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerJournalEntryServiceImpl.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerJournalEntryServiceImpl.java @@ -50,7 +50,7 @@ public void addListeners() { new HandleLoanJournalEntryCreatedBusinessEvent()); } - private class HandleLoanJournalEntryCreatedBusinessEvent implements BusinessEventListener { + private final class HandleLoanJournalEntryCreatedBusinessEvent implements BusinessEventListener { @Override public void onBusinessEvent(LoanJournalEntryCreatedBusinessEvent event) { diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanStatusChangePlatformServiceImpl.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanStatusChangePlatformServiceImpl.java index 352be35f8b8..e1855f0b178 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanStatusChangePlatformServiceImpl.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanStatusChangePlatformServiceImpl.java @@ -43,7 +43,7 @@ public void addListeners() { new ExternalAssetOwnerLoanStatusChangedListener()); } - private class ExternalAssetOwnerLoanStatusChangedListener implements BusinessEventListener { + private final class ExternalAssetOwnerLoanStatusChangedListener implements BusinessEventListener { @Override public void onBusinessEvent(LoanStatusChangedBusinessEvent event) { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessor.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessor.java index 9d3adeedc1e..ca91b8ae6f9 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessor.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessor.java @@ -910,7 +910,7 @@ private Predicate getFilterPredicate(PaymentAl @AllArgsConstructor @Getter @Setter - private static class Balances { + private static final class Balances { private Money aggregatedPrincipalPortion; private Money aggregatedFeeChargesPortion; diff --git a/fineract-provider/src/main/java/org/apache/fineract/ServerApplication.java b/fineract-provider/src/main/java/org/apache/fineract/ServerApplication.java index 2bbe662e9c6..f95ad1c23c5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/ServerApplication.java +++ b/fineract-provider/src/main/java/org/apache/fineract/ServerApplication.java @@ -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) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignDomainServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignDomainServiceImpl.java index 92880b7e1f1..64b1283a4f1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignDomainServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignDomainServiceImpl.java @@ -55,7 +55,7 @@ public void addListeners() { new SendEmailOnLoanRepayment()); } - private class SendEmailOnLoanRepayment implements BusinessEventListener { + private final class SendEmailOnLoanRepayment implements BusinessEventListener { @Override public void onBusinessEvent(LoanTransactionMakeRepaymentPostBusinessEvent event) { @@ -68,7 +68,7 @@ public void onBusinessEvent(LoanTransactionMakeRepaymentPostBusinessEvent event) } } - private class SendEmailOnLoanRejected implements BusinessEventListener { + private final class SendEmailOnLoanRejected implements BusinessEventListener { @Override public void onBusinessEvent(LoanRejectedBusinessEvent event) { @@ -81,7 +81,7 @@ public void onBusinessEvent(LoanRejectedBusinessEvent event) { } } - private class SendEmailOnLoanApproved implements BusinessEventListener { + private final class SendEmailOnLoanApproved implements BusinessEventListener { @Override public void onBusinessEvent(LoanApprovedBusinessEvent event) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignDomainServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignDomainServiceImpl.java index 582a4b4d859..62debdffeb9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignDomainServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignDomainServiceImpl.java @@ -382,7 +382,7 @@ private HashMap processSavingsTransactionDataForSms(final Saving return smsParams; } - private class SendSmsOnLoanApproved implements BusinessEventListener { + private final class SendSmsOnLoanApproved implements BusinessEventListener { @Override public void onBusinessEvent(LoanApprovedBusinessEvent event) { @@ -391,7 +391,7 @@ public void onBusinessEvent(LoanApprovedBusinessEvent event) { } } - private class SendSmsOnLoanRejected implements BusinessEventListener { + private final class SendSmsOnLoanRejected implements BusinessEventListener { @Override public void onBusinessEvent(LoanRejectedBusinessEvent event) { @@ -400,7 +400,7 @@ public void onBusinessEvent(LoanRejectedBusinessEvent event) { } } - private class SendSmsOnLoanRepayment implements BusinessEventListener { + private final class SendSmsOnLoanRepayment implements BusinessEventListener { @Override public void onBusinessEvent(LoanTransactionMakeRepaymentPostBusinessEvent event) { @@ -408,7 +408,7 @@ public void onBusinessEvent(LoanTransactionMakeRepaymentPostBusinessEvent event) } } - private class ClientActivatedListener implements BusinessEventListener { + private final class ClientActivatedListener implements BusinessEventListener { @Override public void onBusinessEvent(ClientActivateBusinessEvent event) { @@ -416,7 +416,7 @@ public void onBusinessEvent(ClientActivateBusinessEvent event) { } } - private class ClientRejectedListener implements BusinessEventListener { + private final class ClientRejectedListener implements BusinessEventListener { @Override public void onBusinessEvent(ClientRejectBusinessEvent event) { @@ -424,7 +424,7 @@ public void onBusinessEvent(ClientRejectBusinessEvent event) { } } - private class SavingsAccountActivatedListener implements BusinessEventListener { + private final class SavingsAccountActivatedListener implements BusinessEventListener { @Override public void onBusinessEvent(SavingsActivateBusinessEvent event) { @@ -432,7 +432,7 @@ public void onBusinessEvent(SavingsActivateBusinessEvent event) { } } - private class SavingsAccountRejectedListener implements BusinessEventListener { + private final class SavingsAccountRejectedListener implements BusinessEventListener { @Override public void onBusinessEvent(SavingsRejectBusinessEvent event) { @@ -440,7 +440,7 @@ public void onBusinessEvent(SavingsRejectBusinessEvent event) { } } - private class DepositSavingsAccountTransactionListener implements BusinessEventListener { + private final class DepositSavingsAccountTransactionListener implements BusinessEventListener { @Override public void onBusinessEvent(SavingsDepositBusinessEvent event) { @@ -448,7 +448,7 @@ public void onBusinessEvent(SavingsDepositBusinessEvent event) { } } - private class NonDepositSavingsAccountTransactionListener implements BusinessEventListener { + private final class NonDepositSavingsAccountTransactionListener implements BusinessEventListener { @Override public void onBusinessEvent(SavingsWithdrawalBusinessEvent event) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/JerseyJacksonObjectArgumentHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/JerseyJacksonObjectArgumentHandler.java index 35abe48c9b4..f0ce3589092 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/JerseyJacksonObjectArgumentHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/JerseyJacksonObjectArgumentHandler.java @@ -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; diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationDomainServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationDomainServiceImpl.java index 4a9f2232c98..c10f8717f9c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationDomainServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationDomainServiceImpl.java @@ -96,7 +96,7 @@ public void addListeners() { new ShareAccountApprovedListener()); } - private class ClientCreatedListener implements BusinessEventListener { + private final class ClientCreatedListener implements BusinessEventListener { @Override public void onBusinessEvent(ClientCreateBusinessEvent event) { @@ -106,7 +106,7 @@ public void onBusinessEvent(ClientCreateBusinessEvent event) { } } - private class CenterCreatedListener implements BusinessEventListener { + private final class CenterCreatedListener implements BusinessEventListener { @Override public void onBusinessEvent(CentersCreateBusinessEvent event) { @@ -116,7 +116,7 @@ public void onBusinessEvent(CentersCreateBusinessEvent event) { } } - private class GroupCreatedListener implements BusinessEventListener { + private final class GroupCreatedListener implements BusinessEventListener { @Override public void onBusinessEvent(GroupsCreateBusinessEvent event) { @@ -126,7 +126,7 @@ public void onBusinessEvent(GroupsCreateBusinessEvent event) { } } - private class SavingsAccountDepositListener implements BusinessEventListener { + private final class SavingsAccountDepositListener implements BusinessEventListener { @Override public void onBusinessEvent(SavingsDepositBusinessEvent event) { @@ -137,7 +137,7 @@ public void onBusinessEvent(SavingsDepositBusinessEvent event) { } } - private class ShareProductDividendCreatedListener implements BusinessEventListener { + private final class ShareProductDividendCreatedListener implements BusinessEventListener { @Override public void onBusinessEvent(ShareProductDividentsCreateBusinessEvent event) { @@ -147,7 +147,7 @@ public void onBusinessEvent(ShareProductDividentsCreateBusinessEvent event) { } } - private class FixedDepositAccountCreatedListener implements BusinessEventListener { + private final class FixedDepositAccountCreatedListener implements BusinessEventListener { @Override public void onBusinessEvent(FixedDepositAccountCreateBusinessEvent event) { @@ -157,7 +157,8 @@ public void onBusinessEvent(FixedDepositAccountCreateBusinessEvent event) { } } - private class RecurringDepositAccountCreatedListener implements BusinessEventListener { + private final class RecurringDepositAccountCreatedListener + implements BusinessEventListener { @Override public void onBusinessEvent(RecurringDepositAccountCreateBusinessEvent event) { @@ -168,7 +169,7 @@ public void onBusinessEvent(RecurringDepositAccountCreateBusinessEvent event) { } } - private class SavingsAccountApprovedListener implements BusinessEventListener { + private final class SavingsAccountApprovedListener implements BusinessEventListener { @Override public void onBusinessEvent(SavingsApproveBusinessEvent event) { @@ -189,7 +190,7 @@ public void onBusinessEvent(SavingsApproveBusinessEvent event) { } } - private class SavingsPostInterestListener implements BusinessEventListener { + private final class SavingsPostInterestListener implements BusinessEventListener { @Override public void onBusinessEvent(SavingsPostInterestBusinessEvent event) { @@ -199,7 +200,7 @@ public void onBusinessEvent(SavingsPostInterestBusinessEvent event) { } } - private class LoanCreatedListener implements BusinessEventListener { + private final class LoanCreatedListener implements BusinessEventListener { @Override public void onBusinessEvent(LoanCreatedBusinessEvent event) { @@ -209,7 +210,7 @@ public void onBusinessEvent(LoanCreatedBusinessEvent event) { } } - private class LoanApprovedListener implements BusinessEventListener { + private final class LoanApprovedListener implements BusinessEventListener { @Override public void onBusinessEvent(LoanApprovedBusinessEvent event) { @@ -219,7 +220,7 @@ public void onBusinessEvent(LoanApprovedBusinessEvent event) { } } - private class LoanClosedListener implements BusinessEventListener { + private final class LoanClosedListener implements BusinessEventListener { @Override public void onBusinessEvent(LoanCloseBusinessEvent event) { @@ -229,7 +230,7 @@ public void onBusinessEvent(LoanCloseBusinessEvent event) { } } - private class LoanCloseAsRescheduledListener implements BusinessEventListener { + private final class LoanCloseAsRescheduledListener implements BusinessEventListener { @Override public void onBusinessEvent(LoanCloseAsRescheduleBusinessEvent event) { @@ -239,7 +240,7 @@ public void onBusinessEvent(LoanCloseAsRescheduleBusinessEvent event) { } } - private class LoanChargebackTransactionListener implements BusinessEventListener { + private final class LoanChargebackTransactionListener implements BusinessEventListener { @Override public void onBusinessEvent(LoanChargebackTransactionBusinessEvent event) { @@ -252,7 +253,7 @@ public void onBusinessEvent(LoanChargebackTransactionBusinessEvent event) { } } - private class LoanMakeRepaymentListener implements BusinessEventListener { + private final class LoanMakeRepaymentListener implements BusinessEventListener { @Override public void onBusinessEvent(LoanTransactionMakeRepaymentPostBusinessEvent event) { @@ -262,7 +263,7 @@ public void onBusinessEvent(LoanTransactionMakeRepaymentPostBusinessEvent event) } } - private class LoanProductCreatedListener implements BusinessEventListener { + private final class LoanProductCreatedListener implements BusinessEventListener { @Override public void onBusinessEvent(LoanProductCreateBusinessEvent event) { @@ -272,7 +273,7 @@ public void onBusinessEvent(LoanProductCreateBusinessEvent event) { } } - private class SavingsAccountCreatedListener implements BusinessEventListener { + private final class SavingsAccountCreatedListener implements BusinessEventListener { @Override public void onBusinessEvent(SavingsCreateBusinessEvent event) { @@ -282,7 +283,7 @@ public void onBusinessEvent(SavingsCreateBusinessEvent event) { } } - private class SavingsAccountClosedListener implements BusinessEventListener { + private final class SavingsAccountClosedListener implements BusinessEventListener { @Override public void onBusinessEvent(SavingsCloseBusinessEvent event) { @@ -292,7 +293,7 @@ public void onBusinessEvent(SavingsCloseBusinessEvent event) { } } - private class ShareAccountCreatedListener implements BusinessEventListener { + private final class ShareAccountCreatedListener implements BusinessEventListener { @Override public void onBusinessEvent(ShareAccountCreateBusinessEvent event) { @@ -302,7 +303,7 @@ public void onBusinessEvent(ShareAccountCreateBusinessEvent event) { } } - private class ShareAccountApprovedListener implements BusinessEventListener { + private final class ShareAccountApprovedListener implements BusinessEventListener { @Override public void onBusinessEvent(ShareAccountApproveBusinessEvent event) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/api/TellerApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/api/TellerApiResource.java index ce49ec6b34d..b881254669b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/api/TellerApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/api/TellerApiResource.java @@ -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; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorDomainServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorDomainServiceImpl.java index 0888fe95dee..209df00dace 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorDomainServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorDomainServiceImpl.java @@ -518,7 +518,7 @@ private void reverseTransaction(final List loanTransactionIds) { } } - private class ValidateOnBusinessEvent implements BusinessEventListener { + private final class ValidateOnBusinessEvent implements BusinessEventListener { @Override public void onBusinessEvent(LoanApprovedBusinessEvent event) { @@ -527,7 +527,7 @@ public void onBusinessEvent(LoanApprovedBusinessEvent event) { } } - private class HoldFundsOnBusinessEvent implements BusinessEventListener { + private final class HoldFundsOnBusinessEvent implements BusinessEventListener { @Override public void onBusinessEvent(LoanApprovedBusinessEvent event) { @@ -536,7 +536,7 @@ public void onBusinessEvent(LoanApprovedBusinessEvent event) { } } - private class ReleaseFundsOnBusinessEvent implements BusinessEventListener { + private final class ReleaseFundsOnBusinessEvent implements BusinessEventListener { @Override public void onBusinessEvent(LoanTransactionMakeRepaymentPostBusinessEvent event) { @@ -549,7 +549,7 @@ public void onBusinessEvent(LoanTransactionMakeRepaymentPostBusinessEvent event) } } - private class ReverseFundsOnBusinessEvent implements BusinessEventListener { + private final class ReverseFundsOnBusinessEvent implements BusinessEventListener { @Override public void onBusinessEvent(LoanUndoWrittenOffBusinessEvent event) { @@ -560,7 +560,7 @@ public void onBusinessEvent(LoanUndoWrittenOffBusinessEvent event) { } } - private class AdjustFundsOnBusinessEvent implements BusinessEventListener { + private final class AdjustFundsOnBusinessEvent implements BusinessEventListener { @Override public void onBusinessEvent(LoanAdjustTransactionBusinessEvent event) { @@ -578,7 +578,7 @@ public void onBusinessEvent(LoanAdjustTransactionBusinessEvent event) { } } - private class ReverseAllFundsOnBusinessEvent implements BusinessEventListener { + private final class ReverseAllFundsOnBusinessEvent implements BusinessEventListener { @Override public void onBusinessEvent(LoanUndoDisbursalBusinessEvent event) { @@ -588,7 +588,7 @@ public void onBusinessEvent(LoanUndoDisbursalBusinessEvent event) { } } - private class UndoAllFundTransactions implements BusinessEventListener { + private final class UndoAllFundTransactions implements BusinessEventListener { @Override public void onBusinessEvent(LoanUndoApprovalBusinessEvent event) { @@ -597,7 +597,7 @@ public void onBusinessEvent(LoanUndoApprovalBusinessEvent event) { } } - private class ReleaseAllFunds implements BusinessEventListener { + private final class ReleaseAllFunds implements BusinessEventListener { @Override public void onBusinessEvent(LoanWrittenOffPostBusinessEvent event) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java index f0a245267f0..52a76ac353b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java @@ -393,7 +393,7 @@ private void handleArrearsForLoan(Loan loan) { } } - private class RefundEventListener implements BusinessEventListener { + private final class RefundEventListener implements BusinessEventListener { @SuppressWarnings("unused") @Override @@ -404,7 +404,7 @@ public void onBusinessEvent(LoanRefundPostBusinessEvent event) { } } - private class AdjustTransactionBusinessEventEventListener implements BusinessEventListener { + private final class AdjustTransactionBusinessEventEventListener implements BusinessEventListener { @Override public void onBusinessEvent(LoanAdjustTransactionBusinessEvent event) { @@ -417,7 +417,7 @@ public void onBusinessEvent(LoanAdjustTransactionBusinessEvent event) { } } - private class MakeRepaymentEventListener implements BusinessEventListener { + private final class MakeRepaymentEventListener implements BusinessEventListener { @Override public void onBusinessEvent(LoanTransactionMakeRepaymentPostBusinessEvent event) { @@ -427,7 +427,7 @@ public void onBusinessEvent(LoanTransactionMakeRepaymentPostBusinessEvent event) } } - private class UndoWrittenOffEventListener implements BusinessEventListener { + private final class UndoWrittenOffEventListener implements BusinessEventListener { @Override public void onBusinessEvent(LoanUndoWrittenOffBusinessEvent event) { @@ -437,7 +437,7 @@ public void onBusinessEvent(LoanUndoWrittenOffBusinessEvent event) { } } - private class WaiveInterestEventListener implements BusinessEventListener { + private final class WaiveInterestEventListener implements BusinessEventListener { @Override public void onBusinessEvent(LoanWaiveInterestBusinessEvent event) { @@ -447,7 +447,7 @@ public void onBusinessEvent(LoanWaiveInterestBusinessEvent event) { } } - private class LoanForeClosureEventListener implements BusinessEventListener { + private final class LoanForeClosureEventListener implements BusinessEventListener { @Override public void onBusinessEvent(LoanForeClosurePostBusinessEvent event) { @@ -457,7 +457,7 @@ public void onBusinessEvent(LoanForeClosurePostBusinessEvent event) { } } - private class LoanChargePaymentEventListener implements BusinessEventListener { + private final class LoanChargePaymentEventListener implements BusinessEventListener { @Override public void onBusinessEvent(LoanChargePaymentPostBusinessEvent event) { @@ -467,7 +467,7 @@ public void onBusinessEvent(LoanChargePaymentPostBusinessEvent event) { } } - private class AddChargeEventListener implements BusinessEventListener { + private final class AddChargeEventListener implements BusinessEventListener { @Override public void onBusinessEvent(LoanAddChargeBusinessEvent event) { @@ -477,7 +477,7 @@ public void onBusinessEvent(LoanAddChargeBusinessEvent event) { } } - private class WaiveChargeEventListener implements BusinessEventListener { + private final class WaiveChargeEventListener implements BusinessEventListener { @Override public void onBusinessEvent(LoanWaiveChargeBusinessEvent event) { @@ -487,7 +487,7 @@ public void onBusinessEvent(LoanWaiveChargeBusinessEvent event) { } } - private class ApplyOverdueChargeEventListener implements BusinessEventListener { + private final class ApplyOverdueChargeEventListener implements BusinessEventListener { @Override public void onBusinessEvent(LoanApplyOverdueChargeBusinessEvent event) { @@ -496,7 +496,7 @@ public void onBusinessEvent(LoanApplyOverdueChargeBusinessEvent event) { } } - private class DisbursementEventListener implements BusinessEventListener { + private final class DisbursementEventListener implements BusinessEventListener { @SuppressWarnings("unused") @Override @@ -506,7 +506,7 @@ public void onBusinessEvent(LoanDisbursalBusinessEvent event) { } } - private class GoodwillCreditEventListener implements BusinessEventListener { + private final class GoodwillCreditEventListener implements BusinessEventListener { @Override public void onBusinessEvent(LoanTransactionGoodwillCreditPostBusinessEvent event) { @@ -516,7 +516,7 @@ public void onBusinessEvent(LoanTransactionGoodwillCreditPostBusinessEvent event } } - private class PaymentRefundEventListener implements BusinessEventListener { + private final class PaymentRefundEventListener implements BusinessEventListener { @Override public void onBusinessEvent(LoanTransactionPayoutRefundPostBusinessEvent event) { @@ -526,7 +526,7 @@ public void onBusinessEvent(LoanTransactionPayoutRefundPostBusinessEvent event) } } - private class LoanBalanceChangedEventListener implements BusinessEventListener { + private final class LoanBalanceChangedEventListener implements BusinessEventListener { @Override public void onBusinessEvent(LoanBalanceChangedBusinessEvent event) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanStatusChangePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanStatusChangePlatformServiceImpl.java index 5ca41a4f318..bbfd56df19c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanStatusChangePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanStatusChangePlatformServiceImpl.java @@ -39,7 +39,7 @@ public void addListeners() { businessEventNotifierService.addPostBusinessEventListener(LoanStatusChangedBusinessEvent.class, new LoanStatusChangedListener()); } - private class LoanStatusChangedListener implements BusinessEventListener { + private final class LoanStatusChangedListener implements BusinessEventListener { @Override public void onBusinessEvent(LoanStatusChangedBusinessEvent event) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/service/TrustModifier.java b/fineract-provider/src/main/java/org/apache/fineract/template/service/TrustModifier.java index f4e221d4da7..390bca73e7b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/service/TrustModifier.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/service/TrustModifier.java @@ -75,7 +75,7 @@ public boolean verify(final String hostname, final SSLSession session) { } } - private static class AlwaysTrustManager implements X509TrustManager { + private static final class AlwaysTrustManager implements X509TrustManager { @Override public void checkClientTrusted(final X509Certificate[] arg0, final String arg1) throws CertificateException {}// NOSONAR diff --git a/fineract-provider/src/test/java/org/apache/fineract/infrastructure/event/business/service/BusinessEventNotifierServiceImplTest.java b/fineract-provider/src/test/java/org/apache/fineract/infrastructure/event/business/service/BusinessEventNotifierServiceImplTest.java index 56984cc8487..f69be4296dc 100644 --- a/fineract-provider/src/test/java/org/apache/fineract/infrastructure/event/business/service/BusinessEventNotifierServiceImplTest.java +++ b/fineract-provider/src/test/java/org/apache/fineract/infrastructure/event/business/service/BusinessEventNotifierServiceImplTest.java @@ -210,7 +210,7 @@ private BusinessEventListener mockListener() { return (BusinessEventListener) mock(BusinessEventListener.class); } - private static class MockBusinessEvent implements BusinessEvent { + private static final class MockBusinessEvent implements BusinessEvent { @Override public Object get() {