Details

    • Type: Sub-task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1-beta-2
    • Fix Version/s: None
    • Component/s: groovy-runtime
    • Labels:
      None
    • Environment:
      Windows XP, Java 1.5, also Ubuntu 7.04 "Feisty Fawn" (JDK 1.6.0) + Groovy Subversion r6911

      Description

      Groovysh lets you set & read private member fields, as long as they're static:

      groovy> class C

      { private static x }

      groovy> C.x = new Integer(10)
      groovy> println C.x
      groovy> go
      10

      Note that it doesn't let you access regular private fields:

      groovy> class B

      { private x }

      groovy> b = new B()
      groovy> b.x = new Integer(10)
      groovy> go
      Caught: groovy.lang.IllegalPropertyAccessException: Can not access the
      private field x in class B

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mcspanky Martin C. Martin
              • Votes:
                8 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated: