FYI: [gui] Kernel.clone() fix from GNU Classpath
Mark Wielaard
mark@klomp.org
Tue Aug 10 14:24:00 GMT 2004
Hi,
This merges the java.awt.image.Kernel.clone() fix from Tom Tromey into
the gui branch.
2004-08-08 Tom Tromey <tromey@redhat.com>
* java/awt/image/Kernel.java (clone): Use super.clone().
Committed.
Cheers,
Mark
Index: java/awt/image/Kernel.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/image/Kernel.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 Kernel.java
--- java/awt/image/Kernel.java 14 Jul 2004 04:46:52 -0000 1.1.2.1
+++ java/awt/image/Kernel.java 8 Aug 2004 12:41:00 -0000
@@ -117,7 +117,7 @@
throws IllegalArgumentException
{
if (data == null)
- return (float[])this.data.clone();
+ return (float[])this.data.clone();
if (data.length < this.data.length)
throw new IllegalArgumentException();
@@ -131,6 +131,13 @@
*/
public Object clone()
{
- return new Kernel(width, height, data);
+ try
+ {
+ return super.clone();
+ }
+ catch (CloneNotSupportedException e)
+ {
+ throw (Error) new InternalError().initCause(e); // Impossible
+ }
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20040810/1c224fa9/attachment.sig>
More information about the Java-patches
mailing list