kylin-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KYLIN-3144) Adopt Collections.emptyList() for empty list values
Date Tue, 02 Jan 2018 04:26:00 GMT

    [ https://issues.apache.org/jira/browse/KYLIN-3144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16307680#comment-16307680
] 

Ted Yu commented on KYLIN-3144:
-------------------------------

I used this command to find candidates:
{code}
git grep 'n new ArrayList<.*>()'
{code}

> Adopt Collections.emptyList() for empty list values
> ---------------------------------------------------
>
>                 Key: KYLIN-3144
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3144
>             Project: Kylin
>          Issue Type: Improvement
>            Reporter: Ted Yu
>            Assignee: jiatao.tao
>            Priority: Minor
>
> Use Collection.emptyList() for returning an empty list instead of returning new ArrayList<>().
> The default constructor creates a buffer of size 10 for ArrayList . Therefore, returning
this static value saves some memory and lessens GC pressure.
> One candidate for replacement is in HybridService#listHybrids()



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message