You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniel Sun (Jira)" <ji...@apache.org> on 2021/06/13 11:23:00 UTC

[jira] [Created] (GROOVY-10136) [JDK16] Failed to find `public` method derived from `package` super class

Daniel Sun created GROOVY-10136:
-----------------------------------

             Summary: [JDK16] Failed to find `public` method derived from `package` super class
                 Key: GROOVY-10136
                 URL: https://issues.apache.org/jira/browse/GROOVY-10136
             Project: Groovy
          Issue Type: Bug
            Reporter: Daniel Sun


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}}

{code:java}
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)
{code}




--
This message was sent by Atlassian Jira
(v8.3.4#803005)