You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error is more easily reproducible by declaring org.codehaus.groovy:groovy-all:2.3.6.
java.lang.Object's method finalize() is not accessible;
referenced by 6 class files
groovy.lang.GroovyLogTestCase (org.codehaus.groovy:groovy-all:2.3.6)
groovy.util.GroovyShellTestCase (org.codehaus.groovy:groovy-all:2.3.6)
groovy.util.JavadocAssertionTestSuite (org.codehaus.groovy:groovy-all:2.3.6)
org.codehaus.groovy.tools.shell.CommandsMultiCompleter (org.codehaus.groovy:groovy-all:2.3.6)
https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize-- shows protected void finalize() throws Throwable. Therefore it shouldn't be a problem to call it from any objects because all objects are subclasses of java.lang.Object. This is the same for the following methods shown in the output:
finalize()
clone()
There are other references to JVM classes such as ClassLoader.addClass but these methods are not found in their Javadoc. So Linkage Checker is working correctly.
changed the title [-]Empty Groovy file generating Linkage Error?[/-][+]Empty Groovy file generating linkage errors on Objects' finalize()[/+]on Aug 12, 2021
changed the title [-]Empty Groovy file generating linkage errors on Objects' finalize()[/-][+]Empty Groovy file generating linkage errors on Object's finalize() method[/+]on Aug 12, 2021
Activity
suztomo commentedon Aug 11, 2021
The error is more easily reproducible by declaring
org.codehaus.groovy:groovy-all:2.3.6.https://gist.github.com/suztomo/e351da7047bfb65505efb0fcb26b42b6
suztomo commentedon Aug 12, 2021
The class file of
groovy.lang.GroovyLogTestCasedoes have a reference tofinalize().https://gist.github.com/suztomo/018723de5f806c7f10f0aefff81a4373#file-gistfile1-txt-L387
https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize-- shows
protected void finalize() throws Throwable. Therefore it shouldn't be a problem to call it from any objects because all objects are subclasses ofjava.lang.Object. This is the same for the following methods shown in the output:There are other references to JVM classes such as
ClassLoader.addClassbut these methods are not found in their Javadoc. So Linkage Checker is working correctly.Memo: branch object_methods
[-]Empty Groovy file generating Linkage Error?[/-][+]Empty Groovy file generating linkage errors on Objects' finalize()[/+][-]Empty Groovy file generating linkage errors on Objects' finalize()[/-][+]Empty Groovy file generating linkage errors on Object's finalize() method[/+]Test that fails
Test that fails
Allow protected member access of java.lang.Object (#2183)