>>>>> "Ingo" == Ingo Prötel <[EMAIL PROTECTED]> writes:

Ingo> If you do a getExceptionTypes() on java.lang.reflect.Method you will get
Ingo> all declared Throwables. This includes RuntimeExceptions and Errors that
Ingo> are declared to be thrown by a method (also for constructors).

Let me offer a contrarian view.  I think declaring these exceptions is
a bit ugly.  It is unnecessary.  I've always viewed the cases where
Sun has done this as simple mistakes on their part.

Second, I doubt there is any program out there that actually relies on
this.  So while this is a theoretical difference, in practice I think
it will affect nothing.  Plus, we have a good argument that code
relying on this is incorrect anyway.  Sun could easily remove these
declarations in a future version; after all, it affects neither source
nor binary compatibility.

We are already not reflection-compatible at other places.  For
instance, we don't always implement the same overloads that Sun does.

Tom


_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to