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

[JDK16] Failed to find `public` method derived from `package` super class

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0
    • None
    • None

    Description

      The public setLength() is defined in java.lang.AbstractStringBuilder, whose visibility is package, the following error happened if accessing setLength() via java.lang.StringBuilder, which is derived from java.lang.AbstractStringBuilder

      TraitsSpecificationTest > testStackableTraits FAILED
          groovy.lang.MissingMethodException: No signature of method: java.lang.StringBuilder.setLength() is applicable for argument types: (Integer) values: [0]
          Possible solutions: setLength(int), length()
              at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:70)
              at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:47)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:139)
              at TraitsSpecificationTest$PrintCategory.reset(TraitsSpecificationTest.groovy:838)
              at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:318)
      

      Attachments

        Issue Links

          Activity

            People

              daniel_sun Daniel Sun
              daniel_sun Daniel Sun
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: