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 8a30acf46f
commit f39ecac488
1 changed files with 2 additions and 2 deletions

View File

@ -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");
}