You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Chia-Ping Tsai (JIRA)" <ji...@apache.org> on 2018/05/02 02:16:00 UTC
[jira] [Updated] (HBASE-20484) Remove the unnecessary autoboxing in
FilterListBase
[ https://issues.apache.org/jira/browse/HBASE-20484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chia-Ping Tsai updated HBASE-20484:
-----------------------------------
Resolution: Fixed
Hadoop Flags: Reviewed
Status: Resolved (was: Patch Available)
Push it to branch-2.0. Thanks for the patch. [~andrewcheng]
> Remove the unnecessary autoboxing in FilterListBase
> ---------------------------------------------------
>
> Key: HBASE-20484
> URL: https://issues.apache.org/jira/browse/HBASE-20484
> Project: HBase
> Issue Type: Improvement
> Reporter: Chia-Ping Tsai
> Assignee: Guangxu Cheng
> Priority: Trivial
> Labels: beginner, beginners
> Fix For: 3.0.0, 2.1.0, 2.0.1
>
> Attachments: HBASE-20484.master.001.patch
>
>
> {code:java}
> protected static boolean checkAndGetReversed(List<Filter> rowFilters, boolean defaultValue) {
> if (rowFilters.isEmpty()) {
> return defaultValue;
> }
> Boolean retValue = rowFilters.get(0).isReversed(); // this one
> boolean allEqual = rowFilters.stream().map(Filter::isReversed).allMatch(retValue::equals);
> if (!allEqual) {
> throw new IllegalArgumentException("Filters in the list must have the same reversed flag");
> }
> return retValue;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)