Proposed API for JEP 259: Stack-Walking API

Mandy Chung mandy.chung at
Thu Nov 19 02:45:31 UTC 2015

> On Nov 18, 2015, at 6:32 PM, David Holmes <david.holmes at> wrote:
> I agree with Remi. "state" doesn't have to mean fields - there are numerous existing examples in the JDK. Calling a method in a context that is invalid is an illegal state to me. IllegalThreadStateException would also work. But UnsupportedOperationException ... more of a stretch.

I also thought about IllegalThreadStateException.  It’s an old exception that will be repurposed if used for getCallerClass case and I think ISA would work.   FWIW - it extends IllegalArgumentException.


More information about the core-libs-dev mailing list