yes it's true:
http://jakarta.apache.org/bcel/xref/org/apache/bcel/generic/CodeExceptionGen.html#110

the classfile api's generally reflect exactly what's in the class file (AFAICT), and the jvm spec says the end pc is exclusive:
http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html#1546


But the generic api's try to be generally useful, and giving a pointer to the instruction after the one that ends the range doesn't seem too useful (at least I've never been particularly interested in that instruction).

So the different api's make a certain amount of sense if you squint at them in exactly the right way...

Erik Corry wrote:
Hi,

http://jakarta.apache.org/bcel/apidocs/org/apache/bcel/generic/CodeExceptionGen.html#getEndPC() says:

getEndPC

public InstructionHandle getEndPC()

    Returns:
            end of handled region (inclusive)



But http://jakarta.apache.org/bcel/apidocs/org/apache/bcel/classfile/CodeException.html#getEndPC() says:

getEndPC

public final int getEndPC()

    Returns:
            Exclusive end index of the region where the handler is active.



Is this really right?  The one method gives you the exclusive and
the other gives you the inclusive end address?


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to