diff options
author | Tom Tromey <tromey@redhat.com> | 2002-01-24 00:49:39 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2002-01-24 00:49:39 +0000 |
commit | 54e1ddc3f8e31d930a633847ab771fbcd619dd90 (patch) | |
tree | cd4ad0ee424ec2f353b8a9b4c5729502c06c7e22 | |
parent | 73d7eb36867eb91a061ce3f14b379f5018cd7bae (diff) | |
download | classpath-54e1ddc3f8e31d930a633847ab771fbcd619dd90.tar.gz |
* java/awt/GridBagConstraints.java (clone): Catch
CloneNotSupportedException.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | java/awt/GridBagConstraints.java | 16 |
2 files changed, 17 insertions, 4 deletions
@@ -1,3 +1,8 @@ +2002-01-23 Tom Tromey <tromey@redhat.com> + + * java/awt/GridBagConstraints.java (clone): Catch + CloneNotSupportedException. + 2002-01-22 Tom Tromey <tromey@redhat.com> Minor changes from libgcj: diff --git a/java/awt/GridBagConstraints.java b/java/awt/GridBagConstraints.java index c91ed0969..dd72a519a 100644 --- a/java/awt/GridBagConstraints.java +++ b/java/awt/GridBagConstraints.java @@ -1,6 +1,6 @@ // GridBagConstraints.java - Constraints for GridBag layout manager -/* Copyright (C) 2000, 2001 Free Software Foundation +/* Copyright (C) 2000, 2001, 2002 Free Software Foundation This file is part of GNU Classpath. @@ -93,9 +93,17 @@ public class GridBagConstraints implements Cloneable, Serializable /** Create a copy of this object. */ public Object clone () { - GridBagConstraints g = (GridBagConstraints) super.clone (); - g.insets = (Insets) insets.clone (); - return g; + try + { + GridBagConstraints g = (GridBagConstraints) super.clone (); + g.insets = (Insets) insets.clone (); + return g; + } + catch (CloneNotSupportedException _) + { + // Can't happen. + return null; + } } /** Create a new GridBagConstraints object with the default |