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

kaze 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 73a8816  FINERACT-822 enable MixedMutabilityReturnType error
73a8816 is described below

commit 73a8816f13b17214d995b6279e2987ead73ca230
Author: percyashu <[email protected]>
AuthorDate: Fri Jun 12 12:40:58 2020 +0100

    FINERACT-822 enable MixedMutabilityReturnType error
    
    FINERACT-822 enable MixedMutabilityReturnType error
---
 fineract-provider/build.gradle                                       | 2 +-
 .../main/java/org/apache/fineract/spm/util/LookupTableMapper.java    | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle
index fb6ac54..2e8dd41 100644
--- a/fineract-provider/build.gradle
+++ b/fineract-provider/build.gradle
@@ -313,7 +313,6 @@ tasks.withType(JavaCompile) {
         disable(
                 "UnusedVariable",
                 "ClassCanBeStatic",
-                "MixedMutabilityReturnType",
                 "SameNameButDifferent",
                 "StringSplitter",
                 "MissingOverride",
@@ -338,6 +337,7 @@ tasks.withType(JavaCompile) {
                 "VariableNameSameAsType",
                 "UnnecessaryParentheses",
                 "MultipleTopLevelClasses",
+                "MixedMutabilityReturnType",
                 "MultiVariableDeclaration",
                 "AssertEqualsArgumentOrderChecker",
                 "EmptySetMultibindingContributions",
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/spm/util/LookupTableMapper.java
 
b/fineract-provider/src/main/java/org/apache/fineract/spm/util/LookupTableMapper.java
index 60e1fe4..f6880b7 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/spm/util/LookupTableMapper.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/spm/util/LookupTableMapper.java
@@ -19,7 +19,6 @@
 package org.apache.fineract.spm.util;
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -50,10 +49,10 @@ public class LookupTableMapper {
                 lookupTableData.getEntries().add(new 
LookupTableEntry(lookupTable.getValueFrom(),
                         lookupTable.getValueTo(), lookupTable.getScore()));
             }
-            return new ArrayList<>(lookupTableDataMap.values());
+            return List.copyOf(lookupTableDataMap.values());
         }
 
-        return Collections.emptyList();
+        return List.of();
     }
 
     public static List<LookupTable> map(final LookupTableData lookupTableData, 
final Survey survey) {

Reply via email to