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

flatten() does not work on byte[]

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 1.5.6
    • 1.5.7, 1.6-beta-2
    • None
    • None

    Description

      The following test script highlights the problem:

      def test =(byte)0
      assert (test.class == java.lang.Byte)

      def test2 = [] << test
      assert (test2[0].class == java.lang.Byte)

      test2 << ('test'.bytes)
      assert (test2[1][0].class == java.lang.Byte)

      test2.flatten()

      // This fails. The value returned by current code is 2
      assert (test2.size() == 5)

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            paulk Paul King
            boardbloke Neill Robbins
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment