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] | |
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
+ }
}
}
Attachment:
signature.asc
Description: This is a digitally signed message part
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |