This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: super.clone() and CloneNotSupportedException


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]