Code review request for 6857789: (reflect) Create common superclass of reflective exceptions

Jason Mehrens jason_mehrens at hotmail.com
Fri Jul 10 15:14:27 UTC 2009


Joe,

 

Wouldn't LinkageException be a better fit than ReflectiveOperationException?  Shorter name and it would mimic the LinkageError inheritance tree introduced in JDK1.0.  I.E. LinkageError -> NoClassDefFoundError, LinkageException -> ClassNotFoundException

 

> This request seems dangerous,
> InvocationTargetException should not be retrofitted because
> usually its catch block is different from the others.


Agreed.


> John Rose recently proposes on coin-dev list a method that can be included
> in the JDK, see
> http://mail.openjdk.java.net/pipermail/coin-dev/2009-June/001954.html
> to simplify catch blocks that catch an InvocationTargetException.


I would think throwing UndeclaredThrowableException would be better than InternalError.

 

Jason

 

_________________________________________________________________
Insert movie times and more without leaving Hotmail®. 
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/core-libs-dev/attachments/20090710/7ead0dda/attachment.html>


More information about the core-libs-dev mailing list