Am 25.01.2013 22:51, schrieb John Rose: > On Jan 25, 2013, at 7:04 AM, Jochen Theodorou wrote: > >> I just noticed something interesting. I had a small program that >> constantly failed with the famous NoClassDefFoundError, that is still >> such an major annoyance, even in jdk7u11. I tried out jdk8b78 and the >> program failed to start as well. But this time because I tried to >> lookup a virtual method on an interface that does not have that >> method. In all cases of this handle being called later the method >> exists in the end, but at the Lookup it did not - still jdk7 did not >> complain. I assume strongly this is a bug in jdk7 > > Can you give me a small test case or sketch of this interface and the > relevant implementation? Is it a simple failure in Lookup?
actually I have to withdraw partially. The method does exist. I was only so happy to get around the error that I did not check carefully. But the whole thing still is fishy - and maybe it is even a bug in jdk7 and one in jdk8 Both lookup-problems where about a Lookup#findVirtual on an interface that extends an interface and the method is defined in the parent interface. So for example there is https://github.com/groovy/groovy-core/blob/master/src/main/org/codehaus/groovy/vmplugin/v7/IndyGuardsFiltersAndSignatures.java#L91 looking for the method invokestatic on Metaclass which is https://github.com/groovy/groovy-core/blob/master/src/main/groovy/lang/MetaClass.java and doesn't define the method on its own. Intead it is defined in MetaObjectProtocol which has the method here https://github.com/groovy/groovy-core/blob/master/src/main/groovy/lang/MetaObjectProtocol.java#L176 and is the parent interface. The other case is about GroovyInterceptable extending GroovyObject and the invokeMethod method. In jdk8 the above mentioned IndyGuardsFiltersAndSignatures.java line 91 failes, where jdk7 does not, but then jdk7 has these NoClassDefFoundError problems, that vannish after fising this. Imho findVirtual should not fail for the lookup on the childinterface, which is why I consider that a bug in jdk8 at least... but maybe that one is known. bye Jochen _______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev