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

flange pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/master by this push:
     new 3554879  Simplify String reusing in SimpleFilter
3554879 is described below

commit 3554879531aea04eb08c584dfc5d7b4bbe31d7cc
Author: Fabian Lange <lange.fab...@gmail.com>
AuthorDate: Wed Apr 11 13:31:45 2018 +0200

    Simplify String reusing in SimpleFilter
---
 .../org/apache/karaf/features/internal/resolver/SimpleFilter.java | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git 
a/features/core/src/main/java/org/apache/karaf/features/internal/resolver/SimpleFilter.java
 
b/features/core/src/main/java/org/apache/karaf/features/internal/resolver/SimpleFilter.java
index c33bda9..c9d4e46 100644
--- 
a/features/core/src/main/java/org/apache/karaf/features/internal/resolver/SimpleFilter.java
+++ 
b/features/core/src/main/java/org/apache/karaf/features/internal/resolver/SimpleFilter.java
@@ -144,13 +144,7 @@ public class SimpleFilter {
     }
 
     private static String reuseCommonString(String str) {
-        if (str != null) {
-            String commonString = COMMON_STRINGS.get(str);
-            if (commonString != null) {
-                return commonString;
-            }
-        }
-        return str;
+        return str != null ? COMMON_STRINGS.getOrDefault(str, str) : null;
     }
 
     private static void toString(StringBuilder sb, List<?> list) {

-- 
To stop receiving notification emails like this one, please contact
fla...@apache.org.

Reply via email to