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

Regression in assignment of single character strings to char array element

    XMLWordPrintableJSON

Details

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

    Description

      There has been a regression in 1.6 that causes the assignment of a String with length 1 to a char location to fail if it is an array element.

      So where as these still work:

      char c
      c = 'a'
      c = '\u00A0'

      these don't (and are fine in 1.5.x):

      char[] ca = new char[1]
      ca[0] = 'a'
      ca[0] = '\u00A0'

      Attachments

        1. groovy-3165-test-diff.txt
          2 kB
          James P. White
        2. groovy-3165-test.txt
          0.7 kB
          James P. White
        3. 3165Patch.zip
          1 kB
          Roshan Dawrani

        Issue Links

          Activity

            People

              roshandawrani Roshan Dawrani
              jimwhite James P. White
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: