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

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

      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

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

              Created:
              Updated:
              Resolved: