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

Rémi Forax forax at univ-mlv.fr
Fri Jul 10 15:48:25 UTC 2009


Jason Mehrens a écrit :
> 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.

You're right, UndeclaredThrowableException is better.

>  
> Jason
Rémi



More information about the core-libs-dev mailing list