You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2018/05/02 02:58:52 UTC

[02/43] hbase git commit: HBASE-20484 Remove the unnecessary autoboxing in FilterListBase

HBASE-20484 Remove the unnecessary autoboxing in FilterListBase

Signed-off-by: Chia-Ping Tsai <ch...@gmail.com>


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

Branch: refs/heads/HBASE-19064
Commit: f39ecac4882cb2f92490c66f385ed4c6387f4510
Parents: 8a30acf
Author: Guangxu Cheng <gu...@gmail.com>
Authored: Wed Apr 25 10:55:52 2018 +0800
Committer: Chia-Ping Tsai <ch...@gmail.com>
Committed: Thu Apr 26 16:32:03 2018 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/filter/FilterListBase.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/f39ecac4/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterListBase.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterListBase.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterListBase.java
index e02f7e2..d6bb75c 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterListBase.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterListBase.java
@@ -56,8 +56,8 @@ public abstract class FilterListBase extends FilterBase {
     if (rowFilters.isEmpty()) {
       return defaultValue;
     }
-    Boolean retValue = rowFilters.get(0).isReversed();
-    boolean allEqual = rowFilters.stream().map(Filter::isReversed).allMatch(retValue::equals);
+    boolean retValue = rowFilters.get(0).isReversed();
+    boolean allEqual = rowFilters.stream().allMatch(f -> f.isReversed() == retValue);
     if (!allEqual) {
       throw new IllegalArgumentException("Filters in the list must have the same reversed flag");
     }