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

Integers not automatically converted to Bytes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6-beta-2
    • 1.6-rc-1, 1.7-beta-1
    • None
    • None

    Description

      Integers are not converted to Byte unless cast to byte first. For example, this throws an ArrayStoreException:

      Byte[] bytes = [1, 2, 3, 4, 5]
      bytes[1] = 50
      

      Test case attached.

      Attachments

        1. 3167_v16x.diff
          2 kB
          Roshan Dawrani
        2. 3167_v17x.diff
          2 kB
          Roshan Dawrani
        3. IntegerToByteTest.groovy
          0.5 kB
          Peter Ledbrook

        Issue Links

          Activity

            People

              roshandawrani Roshan Dawrani
              pledbrook Peter Ledbrook
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: