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

Static method not found on Java interface

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Information Provided
    • 4.0.1, 4.0.2
    • None
    • Compiler
    • None

    Description

      The following code works with Groovy 3.0.10, but fails with Groovy 4.0.1:

      https://gist.github.com/lptr/424bfd3e95cd51df03ff67c2ae76cebc

      The failure is as follows:

      Caught: groovy.lang.MissingMethodException: No signature of method: Geza.staticMethod() is applicable for argument types: (String) values: [Hello]
      Possible solutions: instanceMethod(java.lang.String)
      groovy.lang.MissingMethodException: No signature of method: Geza.staticMethod() is applicable for argument types: (String) values: [Hello]
      Possible solutions: instanceMethod(java.lang.String)
              at Geza.instanceMethod(Geza.groovy:4)
              at script.run(script.groovy:1)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            lptr Lóránt Pintér
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: