You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "stack (JIRA)" <ji...@apache.org> on 2018/11/01 16:07:00 UTC
[jira] [Updated] (HBASE-19682) Use Collections.emptyList() For
Empty List Values
[ https://issues.apache.org/jira/browse/HBASE-19682?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
stack updated HBASE-19682:
--------------------------
Resolution: Fixed
Hadoop Flags: Reviewed
Fix Version/s: 2.2.0
3.0.0
Status: Resolved (was: Patch Available)
Pushed to branch-2 and master. Thank you for the nice cleanup [~belugabehr]
> Use Collections.emptyList() For Empty List Values
> -------------------------------------------------
>
> Key: HBASE-19682
> URL: https://issues.apache.org/jira/browse/HBASE-19682
> Project: HBase
> Issue Type: Improvement
> Affects Versions: 3.0.0
> Reporter: BELUGA BEHR
> Assignee: BELUGA BEHR
> Priority: Minor
> Fix For: 3.0.0, 2.2.0
>
> Attachments: HBASE-19682.1.patch, HBASE-19682.2.patch, HBASE-19682.3.1.patch, HBASE-19682.4.patch, HBASE-19682.5.patch, HBASE-19682.6.patch, HBASE-19682.7.patch, example.patch
>
>
> Use {{Collection.emptyList()}} for returning an empty list instead of {{return new ArrayList<> ()}}. The default constructor creates a buffer of size 10 for _ArrayList_ therefore, returning this static value saves on some memory and GC pressure and saves time not having to allocate a new internally buffer for each instantiation.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)