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

flatten() does not work on byte[]

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.5.6
    • Fix Version/s: 1.5.7, 1.6-beta-2
    • Component/s: None
    • Labels:
      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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: