[concurrency-interest] Thread interruption protocol: InterruptedException is a "checked" exception, correct?
jason_mehrens at hotmail.com
Thu May 21 11:29:08 EDT 2009
> The point of this issue is that Class.newInstance() can throw undeclared
> checked exceptions, so you shouldn't use it, period. Use
> Class.getConstructor().newInstance() instead. Other than that, you
> generally won't get InterruptedException unless you're calling a method
> that declares it.
On a related note, I've filed an RFE with findbugs so that a future version may actually flag calls to Class.newInstance. I have yet to write a detector for it.
Hotmail® has ever-growing storage! Don’t worry about storage limits.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest