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

Compile in groovyConsole instantiates class

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.2
    • Fix Version/s: 2.4.6
    • Component/s: Groovy Console
    • Labels:
      None

      Description

      Probably not serious, but put this in groovyConsole and compile…

      class OtherThing {
          OtherThing() {
              def v = null
              v.hashCode()
          }
      }
      

      You'll get an NPE for the v.hashCode() line. If you add another statement before the class def (e.g. def c = null) it doesn't happen.

      Weird.

        Attachments

          Activity

            People

            • Assignee:
              pascalschumacher Pascal Schumacher
              Reporter:
              ldaley Luke Daley
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: