Proposed API for JEP 259: Stack-Walking API

John Rose john.r.rose at
Thu Nov 19 04:44:48 UTC 2015

On Nov 18, 2015, at 6:32 PM, David Holmes <david.holmes at> wrote:
>>> Looks good to me too if IllegalStateException is used instead of
>>> UnsupportedOperationException.
>>> UnsuppportedOperationException is used when the operation is not
>>> available, here, the same code can work or not depending how it is
>>> called.
>> But IllegalStateException is dependent on some state. There's no state
>> involved here (in the sense "state" is characterized in Java). My 1st
> 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.


More information about the core-libs-dev mailing list