diff options
Diffstat (limited to 'libjava/gnu/gcj/xlib/WindowAttributes.java')
-rw-r--r-- | libjava/gnu/gcj/xlib/WindowAttributes.java | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/libjava/gnu/gcj/xlib/WindowAttributes.java b/libjava/gnu/gcj/xlib/WindowAttributes.java index 6efeaa5d434..23be37d6363 100644 --- a/libjava/gnu/gcj/xlib/WindowAttributes.java +++ b/libjava/gnu/gcj/xlib/WindowAttributes.java @@ -43,15 +43,23 @@ public class WindowAttributes public Object clone() { - WindowAttributes attributes = (WindowAttributes) super.clone(); - // In case of an exception before the stucture is copied. - attributes.in = null; - attributes.out = null; - - // FIXME: do anything else? + try + { + WindowAttributes attributes = (WindowAttributes) super.clone(); + // In case of an exception before the stucture is copied. + attributes.in = null; + attributes.out = null; + + // FIXME: do anything else? - attributes.init(this); - return attributes; + attributes.init(this); + return attributes; + } + catch (CloneNotSupportedException ex) + { + // This should never happen. + throw new InternalError (); + } } public native void setBackground(long pixel); |