hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "BELUGA BEHR (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-19682) Use Collections.emptyList() For Empty List Values
Date Mon, 01 Jan 2018 22:10:04 GMT
BELUGA BEHR created HBASE-19682:

             Summary: Use Collections.emptyList() For Empty List Values
                 Key: HBASE-19682
                 URL: https://issues.apache.org/jira/browse/HBASE-19682
             Project: HBase
          Issue Type: Improvement
          Components: hbase
    Affects Versions: 3.0.0
            Reporter: BELUGA BEHR
            Priority: Minor

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

View raw message