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

Replace usages of Collection.toArray() with Collection.toArray(T[]) to avoid redundant array copying

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • None
    • 18
    • core-libs
    • None
    • b10

    Description

      Andrey Turbanov:

      I found few places, where code initially perform Object[] Colleciton.toArray() call and then manually copy array into another array with required type.
      This PR cleanups such places to more shorter call T[] Collection.toArray(T[]).

      https://github.com/openjdk/jdk/pull/4487

      Attachments

        Issue Links

          Activity

            People

              stsypanov Sergey Tsypanov
              stsypanov Sergey Tsypanov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: