[concurrency-interest] Thread interruption protocol: InterruptedException is a "checked" exception, correct?

Jim Andreou jim.andreou at gmail.com
Wed May 20 09:42:38 EDT 2009


There are quite a few ways someone could throw a checked exception
without declaring it at compile time, actually.
Thread.stop(Throwable), Class.newInstance(), and there must be another
one too.

2009/5/20 Péter Kovács <peter.kovacs.1.0rc at gmail.com>:
> Hi,
>
> Is it possible to get java.lang.InterruptedException, even if none of
> the method along the call stack declares this exception?
>
> We are experiencing such a case. Class.forName(String) appears to
> throw the exception.
>
> Is it not a breach of one of the fundamental contracts of the Java
> language: "checked" exception are not allowed to be thrown in a method
> without this method being declared to (potentially) throw it? (We
> catch this exception as a Throwable in a catch(Throwable) clause.)
>
> Thanks
> Peter
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
>



More information about the Concurrency-interest mailing list