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

MetaClassImpl creates static meta property for non-static field and getter (no setter)

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0-beta-2
    • None
    • None

    Description

      Consider the following (java.awt.Font is an example of this):

      class C {
        protected String name
        public String getName() { name }
      }
      C.name // calls Class#getName()
      

      MetaClassImpl#establishStaticMetaProperty returns a non-null result for "name". This can get tripped up in access checking when really the static property accessed here is from Class.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            emilles Eric Milles
            emilles Eric Milles
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment