Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8258804

Collection.toArray() should use empty array

    XMLWordPrintable

Details

    Description

      Comparing to Collection.toArray(new T[size)), the Collection.toArray(new T[0]) seems faster, safer and contractually cleaner.

      Attachments

        Issue Links

          Activity

            People

              xuelei Xuelei Fan
              xuelei Xuelei Fan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: