tez-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Mollitor (Jira)" <j...@apache.org>
Subject [jira] [Created] (TEZ-4321) Do Not Wrap Singleton Collections
Date Tue, 27 Jul 2021 16:01:00 GMT
David Mollitor created TEZ-4321:
-----------------------------------

             Summary: 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


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)

Mime
View raw message