You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by vo...@apache.org on 2020/06/07 16:40:18 UTC

[fineract] branch develop updated: remove bad 'default:' in SavingsEnumerations switch

This is an automated email from the ASF dual-hosted git repository.

vorburger 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 4528231  remove bad 'default:' in SavingsEnumerations switch
4528231 is described below

commit 4528231fd106acb57d70141b53f01d426b0f042e
Author: Michael Vorburger <mi...@vorburger.ch>
AuthorDate: Sun Jun 7 15:08:47 2020 +0200

    remove bad 'default:' in SavingsEnumerations switch
    
    This default: is "wrong", because it's not required - the switch,
    in this particular case, *IS* actually already handling all cases.
    
    But if in the future someone were to add an additional new
    SavingsAccountTransactionType, then we would want Error Prone to
    fail to signal that it needs to be handled here - but the "default:"
    would "hide" that.
    
    This is a follow-up to https://github.com/apache/fineract/pull/983/
    for FINERACT-822, and also related to the discussion started on
    https://github.com/apache/fineract/pull/989.
    
    There originally used to be a "default:" in the middle of the switch,
    that obviously WAS completely wrong and an old copy-paste bug.
---
 .../apache/fineract/portfolio/savings/service/SavingsEnumerations.java   | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsEnumerations.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsEnumerations.java
index 071b2e4..ed604d4 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsEnumerations.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsEnumerations.java
@@ -199,7 +199,6 @@ public class SavingsEnumerations {
                 optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.AMOUNT_RELEASE.getValue().longValue(),
                         SavingsAccountTransactionType.AMOUNT_RELEASE.getCode(), "Release Amount");
                 break;
-            default:
         }
         return optionData;
     }