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

Wrong initialization order for static fields in enums

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.5.6, 1.5.7, 1.6-beta-2
    • 1.6-rc-1, 1.5.8, 1.7-beta-1
    • None
    • None
    • Gentoo Linux, SUN JVM 1.6.0.10

    Description

      In an enum declaration, i'm using a static list that holds references to the enum values. The list is not initialized correctly, all values are set to null instead of the expected enum.

      Attachments

        1. 3161_v15x.diff
          4 kB
          Roshan Dawrani
        2. 3161_v16x.diff
          4 kB
          Roshan Dawrani
        3. 3161_v17x.diff
          4 kB
          Roshan Dawrani
        4. EnumTest.groovy
          0.3 kB
          Jochen Hinrichsen

        Activity

          People

            roshandawrani Roshan Dawrani
            jot1109 Jochen Hinrichsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: