[ 
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-tests-src.zip

Attach zip with:
* Java sources for test for BCEL-187

Here the sources used to generate the classfile test cases.

> 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
>            Reporter: Jérôme Leroux
>             Fix For: 6.0
>
>         Attachments: BCEL-187-tests-src.zip, 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)

Reply via email to