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

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 18
    • Component/s: core-libs
    • Labels:
      None
    • Resolved In Build:
      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

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

                Dates

                Created:
                Updated:
                Resolved: