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

groovysh & groovysh completion vulnerable to Classes with custom getProperty()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.2.0-beta-1
    • Groovysh
    • None
    • Any

    Description

      Groovyjsh may raise MissingpropertyExceptions due to careless calls to the .class property, should use getClass instead (one call introduce by me earlier).
      The same goes for completion, which btw can be extended to complete properties found via getProperties().
      To reproduece, e.g. call (on groovy master branch):

      x = new Object() {public Object getProperty(String name) {throw new MissingPropertyException('From test', name, null)}}

      or tab completion on such an Object.

      Attachments

        Activity

          People

            pschumacher Pascal Schumacher
            tkruse Thibault Kruse
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: