You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tez.apache.org by "Jonathan Turner Eagles (Jira)" <ji...@apache.org> on 2021/08/09 20:46:00 UTC

[jira] [Resolved] (TEZ-4321) Do Not Wrap Singleton Collections

     [ https://issues.apache.org/jira/browse/TEZ-4321?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Turner Eagles resolved TEZ-4321.
-----------------------------------------
    Fix Version/s: 0.10.2
                   0.9.3
       Resolution: Fixed

Thanks, [~belugabehr]. Simple straight-forward improvement.

> Do Not Wrap Singleton Collections
> ---------------------------------
>
>                 Key: TEZ-4321
>                 URL: https://issues.apache.org/jira/browse/TEZ-4321
>             Project: Apache Tez
>          Issue Type: Improvement
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Minor
>             Fix For: 0.9.3, 0.10.2
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Singleton Collections are by their design immutable.  There is no need to wrap them in an 	unmodifiableCollection.
> https://docs.oracle.com/javase/9/docs/api/java/util/Collections.html#singletonList-T-
> {code:none}
> public static <T> List<T> singletonList​(T o)
> Returns an immutable list containing only the specified object.
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)