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/04/26 08:32:25 UTC
hbase git commit: HBASE-20484 Remove the unnecessary autoboxing in
FilterListBase
Repository: hbase
Updated Branches:
refs/heads/branch-2 101055e34 -> 3fc2c3bf3
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/3fc2c3bf
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/3fc2c3bf
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/3fc2c3bf
Branch: refs/heads/branch-2
Commit: 3fc2c3bf34c473529bc3f164b0e96c59d068a77d
Parents: 101055e
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:14 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/3fc2c3bf/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");
}