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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 4.0.0-alpha-1, 2.5.14, 3.0.6
    • None
    • None

    Description

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

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

      Attachments

        Activity

          People

            emilles Eric Milles
            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