[
https://issues.apache.org/jira/browse/BCEL-187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jérôme Leroux updated BCEL-187:
-------------------------------
Attachment: BCEL-187.zip
BCEL-187.patch
Attach patch with:
* Fix for BCEL-187
* Test for BCEL-187
Attach zip with:
* Classfile for test for BCEL-187
> Verification error when an invoke references a method defined in superclass
> ---------------------------------------------------------------------------
>
> Key: BCEL-187
> URL: https://issues.apache.org/jira/browse/BCEL-187
> Project: Commons BCEL
> Issue Type: Bug
> Components: Verifier
> Affects Versions: 5.2, 6.x
> Reporter: Jérôme Leroux
> Attachments: BCEL-187.patch, BCEL-187.zip
>
>
> Assuming a class A with a method foo() and a class B subclass of A. If an
> invoke opcode references the method B.foo() then the bytecode verifier raises
> an error with the following error message:
> {quote}
> Referenced method 'foo' with expected signature '()void' not found in class
> 'B'. The native verifier does allow the method to be declared in some
> superinterface, which the Java Virtual Machine Specification, Second Edition
> does not.
> {quote}
> I can't find where in the _Java Virtual Machine Specification, Second
> Edition_ this restriction is defined.
> The verification of the bytecode generated by the following code fails:
> {code:java}
> public class TestLegalInvokeInterface01{
> public static void test1(Interface01 t){
> t.run();
> }
> }
> interface Interface01 extends Runnable {
>
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)