karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject [01/11] karaf git commit: Java 8 refactoring
Date Mon, 15 May 2017 13:12:01 GMT
Repository: karaf
Updated Branches:
  refs/heads/master 32f73e2fa -> 9b99ac740


Java 8 refactoring

Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/f8ffd74c
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/f8ffd74c
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/f8ffd74c

Branch: refs/heads/master
Commit: f8ffd74c3c7e1919aba35388092d92359ca91cca
Parents: 32f73e2
Author: Guillaume Nodet <gnodet@apache.org>
Authored: Mon May 15 13:20:59 2017 +0200
Committer: Guillaume Nodet <gnodet@apache.org>
Committed: Mon May 15 13:20:59 2017 +0200

----------------------------------------------------------------------
 .../org/apache/karaf/features/internal/service/Blacklist.java | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/f8ffd74c/features/core/src/main/java/org/apache/karaf/features/internal/service/Blacklist.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/service/Blacklist.java
b/features/core/src/main/java/org/apache/karaf/features/internal/service/Blacklist.java
index ba8c8a6..22610b7 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/service/Blacklist.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/service/Blacklist.java
@@ -64,12 +64,7 @@ public class Blacklist {
     }
 
     public static void blacklist(Features features, Clause[] clauses) {
-        for (Iterator<Feature> iterator = features.getFeature().iterator(); iterator.hasNext();
) {
-            Feature feature = iterator.next();
-            if (blacklist(feature, clauses)) {
-                iterator.remove();
-            }
-        }
+        features.getFeature().removeIf(feature -> blacklist(feature, clauses));
     }
 
     public static boolean blacklist(Feature feature, Clause[] clauses) {


Mime
View raw message