Groovy
  1. Groovy
  2. GROOVY-5278

groovy allows top-level classes be marked as private

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0-beta-3
    • Component/s: None
    • Labels:

      Description

      Groovy allows to make a class like this: private class X{}.
      The result is a top level class, that will be having the private modifier set. But the JVM spec does not include this modifier in the allowed modifiers for classes. Instead this modifier is supposed to be a reserved flag for future use. The violation of this causes internal errors when using indy.

        Activity

        Jochen Theodorou created issue -
        Jochen Theodorou made changes -
        Field Original Value New Value
        Labels breaking
        Guillaume Delcroix made changes -
        Summary groovy allows classes be marked as private groovy allows top-level classes be marked as private
        Hide
        Jochen Theodorou added a comment -

        I reduced the priority a bit because I found it was not this, that causes the indy internal error. The same issue happens with package scoped classes. Also those private classes are quite a bit in use it seems. It would maybe be better to provide an implementation for example as static inner class or such

        Show
        Jochen Theodorou added a comment - I reduced the priority a bit because I found it was not this, that causes the indy internal error. The same issue happens with package scoped classes. Also those private classes are quite a bit in use it seems. It would maybe be better to provide an implementation for example as static inner class or such
        Jochen Theodorou made changes -
        Priority Blocker [ 1 ] Major [ 3 ]
        Hide
        Jochen Theodorou added a comment -

        we decided to make it fail at compilation for now

        Show
        Jochen Theodorou added a comment - we decided to make it fail at compilation for now
        Hide
        Jochen Theodorou added a comment -

        I implemented the compiler check, which will now throw an exception if it encounters a private top level class

        Show
        Jochen Theodorou added a comment - I implemented the compiler check, which will now throw an exception if it encounters a private top level class
        Jochen Theodorou made changes -
        Fix Version/s 2.0-beta-3 [ 18244 ]
        Fix Version/s 2.0-beta-x [ 17013 ]
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12734201 ] Default workflow, editable Closed status [ 12745957 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12971673 ] Default workflow, editable Closed status [ 12979439 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        11d 17h 26m 1 Jochen Theodorou 14/Feb/12 07:55

          People

          • Assignee:
            Jochen Theodorou
            Reporter:
            Jochen Theodorou
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development