This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: super.clone() and CloneNotSupportedException
- From: Tom Tromey <tromey at redhat dot com>
- To: Anthony Green <green at redhat dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: 20 Jul 2003 19:50:56 -0600
- Subject: Re: Patch: super.clone() and CloneNotSupportedException
- References: <1058663716.23014.1356.camel@escape>
- Reply-to: tromey at redhat dot com
>>>>> "Anthony" == Anthony Green <green@redhat.com> writes:
Anthony> 2003-07-19 Anthony Green <green@redhat.com>
Anthony> * gnu/awt/j2d/AbstractGraphicsState.java (clone): Handle
Anthony> CloneNotSupportedException.
Anthony> * gnu/gcj/xlib/WindowAttributes.java (clone): Ditto.
Anthony> * gnu/gcj/xlib/WMSizeHints.java (clone): Ditto.
Anthony> * gnu/gcj/xlib/GC.java (clone): Ditto.
Anthony> * gnu/awt/xlib/XGraphics.java (clone): Ditto.
Anthony> * gnu/awt/j2d/Graphics2DImpl.java (clone): Ditto.
Ok, thanks.
Anthony> + catch (CloneNotSupportedException ex)
Anthony> + {
Anthony> + // This should never happen.
Anthony> + throw new InternalError ();
Anthony> + }
In other places we've used "return null". Yours is probably nicer.
It doesn't matter much, since this really, really is a "can't happen".
Something would have to be pretty broken for us to get to that branch.
Tom