You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Dave Brosius (JIRA)" <ji...@apache.org> on 2018/04/06 02:50:00 UTC
[jira] [Updated] (CASSANDRA-14367) prefer Collections.singletonList
to Arrays.asList(one_element)
[ https://issues.apache.org/jira/browse/CASSANDRA-14367?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dave Brosius updated CASSANDRA-14367:
-------------------------------------
Attachment: 14367.txt
> prefer Collections.singletonList to Arrays.asList(one_element)
> --------------------------------------------------------------
>
> Key: CASSANDRA-14367
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14367
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Dave Brosius
> Assignee: Dave Brosius
> Priority: Trivial
> Fix For: 4.x
>
> Attachments: 14367.txt
>
>
> small improvement, but Arrays.asList first creates an array, then wraps it with a collections instance, whereas Collections.singletonList just creates one small (one field) bean instance.
> so a small cut down on garbage generated.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org