james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [1/4] james-project git commit: JAMES-2110 IntelliJ simplifications in Keyword class
Date Mon, 09 Apr 2018 07:31:41 GMT
Repository: james-project
Updated Branches:
  refs/heads/master e5f7dc703 -> 4e44ec150


JAMES-2110 IntelliJ simplifications in Keyword class


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/0512daba
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/0512daba
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/0512daba

Branch: refs/heads/master
Commit: 0512daba5185e35fbcc7cd216c8ea8ed6cd6f8a2
Parents: 2ca396f
Author: benwa <btellier@linagora.com>
Authored: Fri Apr 6 14:21:27 2018 +0700
Committer: benwa <btellier@linagora.com>
Committed: Mon Apr 9 14:30:55 2018 +0700

----------------------------------------------------------------------
 .../jmap/src/main/java/org/apache/james/jmap/model/Keywords.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/0512daba/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/Keywords.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/Keywords.java
b/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/Keywords.java
index 72c12aa..1f100c1 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/Keywords.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/Keywords.java
@@ -74,7 +74,7 @@ public class Keywords {
         }
 
         public KeywordsFactory filterImapNonExposedKeywords() {
-            filter = Optional.of(keyword -> keyword.isExposedImapKeyword());
+            filter = Optional.of(Keyword::isExposedImapKeyword);
             return this;
         }
 
@@ -102,7 +102,7 @@ public class Keywords {
         Keywords fromMap(Map<String, Boolean> mapKeywords) {
             Preconditions.checkArgument(mapKeywords.values()
                 .stream()
-                .noneMatch(keywordValue -> keywordValue == false), "Keyword must be true");
+                .allMatch(keywordValue -> keywordValue), "Keyword must be true");
             Set<Keyword> setKeywords = mapKeywords.keySet()
                 .stream()
                 .map(Keyword::new)


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message