HBASE-20484 Remove the unnecessary autoboxing in FilterListBase

Signed-off-by: Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
Guangxu Cheng 2018-04-25 10:55:52 +08:00 committed by Chia-Ping Tsai
parent 101055e343
commit 3fc2c3bf34
1 changed files with 2 additions and 2 deletions

View File

@ -56,8 +56,8 @@ public abstract class FilterListBase extends FilterBase {
if (rowFilters.isEmpty()) { if (rowFilters.isEmpty()) {
return defaultValue; return defaultValue;
} }
Boolean retValue = rowFilters.get(0).isReversed(); boolean retValue = rowFilters.get(0).isReversed();
boolean allEqual = rowFilters.stream().map(Filter::isReversed).allMatch(retValue::equals); boolean allEqual = rowFilters.stream().allMatch(f -> f.isReversed() == retValue);
if (!allEqual) { if (!allEqual) {
throw new IllegalArgumentException("Filters in the list must have the same reversed flag"); throw new IllegalArgumentException("Filters in the list must have the same reversed flag");
} }