Code review request for 6857789: (reflect) Create common superclass of reflective exceptions
martinrb at google.com
Sat Jul 11 08:23:02 PDT 2009
I have some sympathy for Jason's suggestion.
The existing parallel hierarchy of classes FooError vs. FooException
makes some sense.
NoSuchMethodError is a LinkageError, so why isn't
NoSuchMethodException a LinkageException?
I consider reflectively extracting Methods and Fields
from a Class to be a form of linking, at run-time.
(But we probably don't want an IncompatibleClassChangeException
to go with IncompatibleClassChangeError)
InvocationTargetException is not a LinkageException,
but might be a ReflectiveOperationException.
On Fri, Jul 10, 2009 at 10:51, Joseph D. Darcy <Joe.Darcy at sun.com> wrote:
> Jason Mehrens wrote:
>> 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
> "LinkageException" is a shorter name, but these conditions do not indicate
> there is a problem with linkage. If there were a linkage program, you
> wouldn't have the reflective object to work with.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the core-libs-dev