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

Jason Mehrens 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.

 

Jason Mehrens

_________________________________________________________________
Hotmail® has ever-growing storage! Don’t worry about storage limits.
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage1_052009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20090521/7ad0a233/attachment.html>


More information about the Concurrency-interest mailing list