Uploaded image for project: 'Apache Tez'
  1. Apache Tez
  2. TEZ-4321

Do Not Wrap Singleton Collections

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.9.3, 0.10.2
    • None
    • None

    Description

      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-

      public static <T> List<T> singletonList​(T o)
      Returns an immutable list containing only the specified object.
      

      Attachments

        Issue Links

          Activity

            People

              belugabehr David Mollitor
              belugabehr David Mollitor
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m