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

hbase git commit: HBASE-20484 Remove the unnecessary autoboxing in FilterListBase

Repository: hbase
Updated Branches:
  refs/heads/branch-2.0 86b763051 -> 6f89cec39


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/6f89cec3
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/6f89cec3
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/6f89cec3

Branch: refs/heads/branch-2.0
Commit: 6f89cec39bb256eef8f1da5b030b1b90e50a6d89
Parents: 86b7630
Author: Guangxu Cheng <gu...@gmail.com>
Authored: Wed Apr 25 10:55:52 2018 +0800
Committer: Chia-Ping Tsai <ch...@gmail.com>
Committed: Wed May 2 10:08:20 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/6f89cec3/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");
     }