diff options
| author | green <green@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-21 02:24:09 +0000 |
|---|---|---|
| committer | green <green@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-21 02:24:09 +0000 |
| commit | 9532b0d168976d5ba8d405773c7cd6e769227e0d (patch) | |
| tree | 1fdfb3ea2ff0fa36614620b8a5da39c2d9743870 /libjava/gnu/gcj/xlib/GC.java | |
| parent | b25dcf1ceeacfc20a9f570759e22e21cba5d4277 (diff) | |
| download | ppe42-gcc-9532b0d168976d5ba8d405773c7cd6e769227e0d.tar.gz ppe42-gcc-9532b0d168976d5ba8d405773c7cd6e769227e0d.zip | |
2003-07-20 Anthony Green <green@redhat.com>
* gnu/awt/j2d/AbstractGraphicsState.java (clone): Handle
CloneNotSupportedException.
* gnu/gcj/xlib/WindowAttributes.java (clone): Ditto.
* gnu/gcj/xlib/WMSizeHints.java (clone): Ditto.
* gnu/gcj/xlib/GC.java (clone): Ditto.
* gnu/awt/xlib/XGraphics.java (clone): Ditto.
* gnu/awt/j2d/Graphics2DImpl.java (clone): Ditto.
* gnu/awt/xlib/XEventLoop.java (postNextEvent): Remove unreachable
handler.
* gnu/gcj/runtime/NameFinder.java (NameFinder): Ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69623 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/gnu/gcj/xlib/GC.java')
| -rw-r--r-- | libjava/gnu/gcj/xlib/GC.java | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/libjava/gnu/gcj/xlib/GC.java b/libjava/gnu/gcj/xlib/GC.java index 021f53756fb..b7eb0b682f4 100644 --- a/libjava/gnu/gcj/xlib/GC.java +++ b/libjava/gnu/gcj/xlib/GC.java @@ -36,15 +36,23 @@ public class GC implements Cloneable */ public Object clone() { - GC gcClone = target.getGCFromCache (); - if (gcClone==null) - { - gcClone = (GC) super.clone(); - gcClone.structure = null; - } - gcClone.initStructure(this); - gcClone.updateClip(); - return gcClone; + try + { + GC gcClone = target.getGCFromCache (); + if (gcClone==null) + { + gcClone = (GC) super.clone(); + gcClone.structure = null; + } + gcClone.initStructure(this); + gcClone.updateClip(); + return gcClone; + } + catch (CloneNotSupportedException ex) + { + // This should never happen. + throw new InternalError (); + } } private native void initStructure(GC copyFrom); |

