Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-9703

DefaultGroovyMethods.reverse(T[], true) performs extra copy

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.0-alpha-1, 2.5.14, 3.0.6
    • Component/s: None
    • Labels:
      None

      Description

      def array = new Object[] {1,2,3}
      array.reverse(true)
      

      In-place reverse performs an extra (unnecessary) System.arraycopy(...).

        Attachments

          Activity

            People

            • Assignee:
              emilles Eric Milles
              Reporter:
              emilles Eric Milles
            • Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 0.5h
                0.5h