I was doing some research related to AccessController, and I noted
this code [1] in StackFrameInfo#getByteCodeIndex():

@Override
public int getByteCodeIndex() {
    // bci not available for native methods
    if (isNativeMethod())
        return -1;

    return bci;
}

Now bci is of type short, and given the spec of the method, should the
return not be:

    return bci & 0xffff;

instead?  Else it would return wrong values for methods with more than
32767 bytecodes in them.

[1] 
http://hg.openjdk.java.net/jdk/jdk/file/e3b6cb90d7ce/src/java.base/share/classes/java/lang/StackFrameInfo.java#l96

-- 
- DML

Reply via email to