[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] Patch: implemented InvocationEvent.getThrowable
From: |
Anthony Balkissoon |
Subject: |
Re: [cp-patches] Patch: implemented InvocationEvent.getThrowable |
Date: |
Tue, 08 Nov 2005 15:52:44 -0500 |
Thanks for the advice Mark, I fixed this up and committed it.
2005-11-08 Anthony Balkissoon <address@hidden>
* java/awt/event/InvocationEvent.java:
(exception): Removed unnecessary field.
(dispatch): Removed reference to field exception.
(getException): If throwable is an Exception, return a casted version,
otherwise return null.
(getThrowable): Improved docs.
--Tony
On Tue, 2005-11-08 at 19:22 +0100, Mark Wielaard wrote:
> Hi Tony,
>
> On Mon, 2005-11-07 at 13:29 -0500, Anthony Balkissoon wrote:
> > JAPI pointed out that InvocationEvent.getThrowable was missing. I wrote
> > it, which involved a slight tweak of dispatch() as well.
> > [...]
> > + /**
> > + * Returns a throwable caught while executing the Runnable's run()
> > method.
> > + * Null if none was thrown or if this InvocationEvent doesn't catch
> > + * throwables.
> > + * @return the caught Throwable
> > + */
> > + public Throwable getThrowable()
> > + {
> > + return throwable;
> > + }
>
> Please add @since 1.5 to such new methods.
> Now we have both a throwable and a exception private field. Unless we
> need them for serialization it is probably better to collapse them into
> one and let getException() do an instanceof Exception.
>
> Cheers,
>
> Mark
> _______________________________________________
> Classpath-patches mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/classpath-patches
InvocationEventGetThrowableFix.diff
Description: Text Data