[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] RFC: java.beans.EventHandler - not finished #1
From: |
Thomas Fitzsimmons |
Subject: |
Re: [cp-patches] RFC: java.beans.EventHandler - not finished #1 |
Date: |
Thu, 10 Mar 2005 15:10:02 -0500 |
On Wed, 2005-03-09 at 06:47 +0100, Robert Schuster wrote:
>Hi,
>I have rewritten java.beans.EventHandler.invoke() to make it follow the
>spec more closely.
>
>Yep, I am proud to announce that this is more to the spec than Sun
>itself (run mauve gnu.testlet.java.beans.EventHandler.check14). There is
>a lot of undocumented behavior here (see another mauve testsuite named
>mauve gnu.testlet.java.beans.EventHandler.check for details on this)
>which I have reproduced as well.
>I am going to add more api documentation to the last two create() method
>variants which then will describe all the stuff that is officially
>undocumented as well as fix error cases which are again weird in this
>class. :(
>
>The main reason for posting the patch is because 'they' do something
>very odd: EventHandler implements the InvocationHandler interface which
>is part of the Proxy API. The InvocationHandler declares the invoke()
>method which has "throws Throwable" in its signature.
>
>However in EventHandler.invoke 'throws Throwable' is missing but the
>method sometimes throws checked exceptions. These are
>NoSuchMethodExceptions and all exceptions that are thrown by the
>reflectively called methods (= InvocationTargetException.getCause() ).
>
>I think for a lame low-tech API like EventHandler its a shame that
>'they' use such trickery. What I want to know is how we should handle this.
>
>My suggestion is to say good-bye to 100% JAPI-compatibility and let it
>show that it may throw Throwables and add an extra 'Note: Sun bad. GNU
>good. ;)' to the doc.
No, this wouldn't be source compatible with Sun. I think source
compatibility is more important than accurate exception checking.
Tom