fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awa...@apache.org
Subject [fineract] branch develop updated: FINERACT-822 enable MissingCasesInEnumSwitch error (#989)
Date Sat, 06 Jun 2020 21:05:53 GMT
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
     new 910eb1f  FINERACT-822 enable MissingCasesInEnumSwitch error (#989)
910eb1f is described below

commit 910eb1f7a8f9f91be7ec7103f962f15f642b6780
Author: Percy Ayuk Ashu <percyayukashu@gmail.com>
AuthorDate: Sat Jun 6 22:05:43 2020 +0100

    FINERACT-822 enable MissingCasesInEnumSwitch error (#989)
---
 fineract-provider/build.gradle                                       | 2 +-
 .../accountnumberformat/data/AccountNumberFormatDataValidator.java   | 1 +
 .../service/AccountNumberFormatReadPlatformServiceImpl.java          | 1 +
 .../organisation/workingdays/domain/WorkingDaysEnumerations.java     | 1 +
 .../portfolio/accountdetails/service/AccountEnumerations.java        | 1 +
 .../interestratechart/service/InterestRateChartEnumerations.java     | 3 ++-
 .../java/org/apache/fineract/portfolio/loanaccount/domain/Loan.java  | 1 +
 .../portfolio/loanaccount/loanschedule/domain/AprCalculator.java     | 1 +
 .../domain/DefaultPaymentPeriodsInOneYearCalculator.java             | 4 +++-
 .../loanschedule/domain/DefaultScheduledDateGenerator.java           | 5 ++++-
 .../loanaccount/loanschedule/domain/LoanApplicationTerms.java        | 2 ++
 .../org/apache/fineract/portfolio/note/api/NotesApiResource.java     | 3 ++-
 .../note/service/NoteWritePlatformServiceJpaRepositoryImpl.java      | 1 +
 .../org/apache/fineract/portfolio/savings/DepositAccountUtils.java   | 1 +
 .../org/apache/fineract/portfolio/savings/domain/SavingsAccount.java | 1 +
 .../fineract/portfolio/savings/domain/SavingsAccountCharge.java      | 3 +++
 .../shareaccounts/serialization/ShareAccountDataSerializer.java      | 1 +
 17 files changed, 27 insertions(+), 5 deletions(-)

diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle
index dbaefb3..2bc2d9d 100644
--- a/fineract-provider/build.gradle
+++ b/fineract-provider/build.gradle
@@ -307,7 +307,6 @@ tasks.withType(JavaCompile) {
                 "UnusedVariable",
                 "InconsistentCapitalization",
                 "ClassCanBeStatic",
-                "MissingCasesInEnumSwitch",
                 "OperatorPrecedence",
                 "MixedMutabilityReturnType",
                 "SameNameButDifferent",
@@ -368,6 +367,7 @@ tasks.withType(JavaCompile) {
                 "ArgumentSelectionDefectChecker",
                 "CompareToZero",
                 "NarrowingCompoundAssignment",
+                "MissingCasesInEnumSwitch",
 //                "ReturnMissingNullable",
 //                "InconsistentOverloads",
 //                "MethodCanBeStatic",
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/data/AccountNumberFormatDataValidator.java
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/data/AccountNumberFormatDataValidator.java
index 088f0f7..601b756 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/data/AccountNumberFormatDataValidator.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/data/AccountNumberFormatDataValidator.java
@@ -127,6 +127,7 @@ public class AccountNumberFormatDataValidator {
         case GROUP:
             validAccountNumberPrefixes = AccountNumberFormatEnumerations.accountNumberPrefixesForGroups;
             break;
+        default:
         }
 
         Set<Integer> validAccountNumberPrefixValues = new HashSet<>();
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatReadPlatformServiceImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatReadPlatformServiceImpl.java
index 6a10c2d..f7d5e74 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatReadPlatformServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatReadPlatformServiceImpl.java
@@ -145,6 +145,7 @@ public class AccountNumberFormatReadPlatformServiceImpl implements AccountNumber
             case GROUP :
                 accountNumberPrefixTypesSet = AccountNumberFormatEnumerations.accountNumberPrefixesForGroups;
             break;
+            default:
         }
 
         Object[] array = accountNumberPrefixTypesSet.toArray();
diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDaysEnumerations.java
b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDaysEnumerations.java
index b5d01f2..ba8a3eb 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDaysEnumerations.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDaysEnumerations.java
@@ -53,6 +53,7 @@ public class WorkingDaysEnumerations {
                 optionData = new EnumOptionData(RepaymentRescheduleType.MOVE_TO_PREVIOUS_WORKING_DAY.getValue().longValue(),RepaymentRescheduleType.MOVE_TO_PREVIOUS_WORKING_DAY.getCode(),
                         "move to previous working day");
                 break;
+            default:
         }
 
         return optionData;
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/service/AccountEnumerations.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/service/AccountEnumerations.java
index 5df9846..f2cb800 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/service/AccountEnumerations.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/service/AccountEnumerations.java
@@ -50,6 +50,7 @@ public class AccountEnumerations {
             case GLIM:
                 optionData = new EnumOptionData(AccountType.GLIM.getValue().longValue(),
AccountType.GLIM.getCode(), "GLIM");
             break;
+            default:
         }
 
         return optionData;
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartEnumerations.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartEnumerations.java
index cd5fdd9..983f022 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartEnumerations.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartEnumerations.java
@@ -52,6 +52,7 @@ public class InterestRateChartEnumerations {
                 optionData = new EnumOptionData(PeriodFrequencyType.YEARS.getValue().longValue(),
                         PeriodFrequencyType.YEARS.getCode(), "Years");
             break;
+            default:
         }
 
         return optionData;
@@ -66,4 +67,4 @@ public class InterestRateChartEnumerations {
         }
         return optionDatas;
     }
-}
\ No newline at end of file
+}
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/Loan.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/Loan.java
index 6722160..5cae47e 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/Loan.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/Loan.java
@@ -4501,6 +4501,7 @@ public class Loan extends AbstractPersistableCustom {
             break;
             case INVALID:
             break;
+            default:
         }
         return dueRepaymentPeriodDate.minusDays(1);// get 2n-1 range date from
                                                    // startDate
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AprCalculator.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AprCalculator.java
index 76467df..a317f46 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AprCalculator.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AprCalculator.java
@@ -57,6 +57,7 @@ public class AprCalculator {
                              case YEARS:
                                  defaultAnnualNominalInterestRate = ratePerPeriod.multiply(BigDecimal.valueOf(1));
                              break;
+                             default:
                          }
              break;
             case INVALID:
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultPaymentPeriodsInOneYearCalculator.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultPaymentPeriodsInOneYearCalculator.java
index 10c6eec..e006127 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultPaymentPeriodsInOneYearCalculator.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultPaymentPeriodsInOneYearCalculator.java
@@ -45,6 +45,7 @@ public class DefaultPaymentPeriodsInOneYearCalculator implements PaymentPeriodsI
             case INVALID:
                 paymentPeriodsInOneYear = Integer.valueOf(0);
             break;
+            default:
         }
         return paymentPeriodsInOneYear;
     }
@@ -91,7 +92,8 @@ public class DefaultPaymentPeriodsInOneYearCalculator implements PaymentPeriodsI
             case INVALID:
                 fraction = Double.valueOf("0");
             break;
+            default:
         }
         return fraction;
     }
-}
\ No newline at end of file
+}
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultScheduledDateGenerator.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultScheduledDateGenerator.java
index 6c7e9c9..18ed7b6 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultScheduledDateGenerator.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultScheduledDateGenerator.java
@@ -227,6 +227,7 @@ public class DefaultScheduledDateGenerator implements ScheduledDateGenerator
{
             break;
             case INVALID:
             break;
+            default:
         }
         return dueRepaymentPeriodDate;
     }
@@ -281,6 +282,7 @@ public class DefaultScheduledDateGenerator implements ScheduledDateGenerator
{
             break;
             case INVALID:
             break;
+            default:
         }
         return isScheduledDate;
     }
@@ -315,6 +317,7 @@ public class DefaultScheduledDateGenerator implements ScheduledDateGenerator
{
             break;
             case INVALID:
             break;
+            default:
         }
 
         return idealDisbursementDate;
@@ -333,4 +336,4 @@ public class DefaultScheduledDateGenerator implements ScheduledDateGenerator
{
         generatedDate = adjustRepaymentDate(generatedDate, loanApplicationTerms, holidayDetailDTO).getChangedScheduleDate();
         return generatedDate;
     }
-}
\ No newline at end of file
+}
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanApplicationTerms.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanApplicationTerms.java
index ba47eef..9423630 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanApplicationTerms.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanApplicationTerms.java
@@ -658,6 +658,7 @@ public final class LoanApplicationTerms {
             break;
             case INVALID:
             break;
+            default:
         }
         return dueRepaymentPeriodDate;
     }
@@ -1050,6 +1051,7 @@ public final class LoanApplicationTerms {
                         }
                         periodicInterestRate = oneDayOfYearInterestRate.multiply(numberOfDaysInPeriod,
mc);
                     break;
+                    default:
                 }
             break;
             case SAME_AS_REPAYMENT_PERIOD:
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/api/NotesApiResource.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/api/NotesApiResource.java
index 23cb1d4..3a2984a 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/api/NotesApiResource.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/api/NotesApiResource.java
@@ -228,10 +228,11 @@ public class NotesApiResource {
                 resourceNameForPermissions = "GROUPNOTE";
                 resourceDetails.withGroupId(resourceId);
             break;
+            default:
 
         }
 
         return resourceDetails.withEntityName(resourceNameForPermissions).build();
     }
 
-}
\ No newline at end of file
+}
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/service/NoteWritePlatformServiceJpaRepositoryImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/service/NoteWritePlatformServiceJpaRepositoryImpl.java
index dd13d6c..c4225b2 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/service/NoteWritePlatformServiceJpaRepositoryImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/service/NoteWritePlatformServiceJpaRepositoryImpl.java
@@ -437,6 +437,7 @@ public class NoteWritePlatformServiceJpaRepositoryImpl implements NoteWritePlatf
             // break;
             case SAVING_ACCOUNT:
             break;
+            default:
         }
         if (noteForUpdate == null) { throw new NoteNotFoundException(noteId, resourceId,
type.name().toLowerCase()); }
         return noteForUpdate;
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountUtils.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountUtils.java
index c9ae0c4..2660418 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountUtils.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountUtils.java
@@ -46,6 +46,7 @@ public class DepositAccountUtils {
             break;
             case INVALID:
             break;
+            default:
         }
         return nextDepositDate;
     }
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java
index 7d462dd..7857696 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java
@@ -2337,6 +2337,7 @@ public class SavingsAccount extends AbstractPersistableCustom {
             case YEARS:
                 lockedInUntilLocalDate = activationLocalDate.plusYears(this.lockinPeriodFrequency).toDate();
             break;
+            default:
         }
 
         return lockedInUntilLocalDate;
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountCharge.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountCharge.java
index 25f02e1..115c728 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountCharge.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountCharge.java
@@ -292,6 +292,7 @@ public class SavingsAccountCharge extends AbstractPersistableCustom {
                 this.amountWaived = null;
                 this.amountWrittenOff = null;
             break;
+            default:
         }
     }
 
@@ -420,6 +421,7 @@ public class SavingsAccountCharge extends AbstractPersistableCustom {
                     this.amountPercentageAppliedTo = null;
                     this.amountOutstanding = null;
                 break;
+                default:
             }
         }
     }
@@ -494,6 +496,7 @@ public class SavingsAccountCharge extends AbstractPersistableCustom {
                     this.amountPercentageAppliedTo = null;
                     this.amountOutstanding = null;
                 break;
+                default:
             }
         }
 
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/serialization/ShareAccountDataSerializer.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/serialization/ShareAccountDataSerializer.java
index 0553ae8..da660da 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/serialization/ShareAccountDataSerializer.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/serialization/ShareAccountDataSerializer.java
@@ -927,6 +927,7 @@ public class ShareAccountDataSerializer {
                 case YEARS:
                     lockinDate = purchaseDate.plusYears(lockinPeriod) ;
                     break ;
+                default:
             }
         }
         return lockinDate ;


Mime
View raw message