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 | |
parent | b25dcf1ceeacfc20a9f570759e22e21cba5d4277 (diff) | |
download | gcc-9532b0d168976d5ba8d405773c7cd6e769227e0d.tar.gz |
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')
-rw-r--r-- | libjava/ChangeLog | 14 | ||||
-rw-r--r-- | libjava/gnu/awt/j2d/AbstractGraphicsState.java | 10 | ||||
-rw-r--r-- | libjava/gnu/awt/j2d/Graphics2DImpl.java | 20 | ||||
-rw-r--r-- | libjava/gnu/awt/xlib/XEventLoop.java | 13 | ||||
-rw-r--r-- | libjava/gnu/awt/xlib/XGraphics.java | 16 | ||||
-rw-r--r-- | libjava/gnu/gcj/runtime/NameFinder.java | 16 | ||||
-rw-r--r-- | libjava/gnu/gcj/xlib/GC.java | 26 | ||||
-rw-r--r-- | libjava/gnu/gcj/xlib/WMSizeHints.java | 20 | ||||
-rw-r--r-- | libjava/gnu/gcj/xlib/WindowAttributes.java | 24 |
9 files changed, 102 insertions, 57 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 8bc4dc79a56..6e2c4922de6 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,17 @@ +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. + 2003-07-20 Steve Pribyl <steve@netfuel.com.> * gnu/gcj/runtime/natSharedLibLoader.cc (init): `libname' now a diff --git a/libjava/gnu/awt/j2d/AbstractGraphicsState.java b/libjava/gnu/awt/j2d/AbstractGraphicsState.java index 1c29bc202f6..038bc9c6c7d 100644 --- a/libjava/gnu/awt/j2d/AbstractGraphicsState.java +++ b/libjava/gnu/awt/j2d/AbstractGraphicsState.java @@ -128,6 +128,14 @@ public abstract class AbstractGraphicsState implements Cloneable public Object clone () { - return super.clone (); + try + { + return super.clone (); + } + catch (CloneNotSupportedException ex) + { + // This should never happen. + throw new InternalError (); + } } } diff --git a/libjava/gnu/awt/j2d/Graphics2DImpl.java b/libjava/gnu/awt/j2d/Graphics2DImpl.java index e5daa9dec6b..dd46e7fe410 100644 --- a/libjava/gnu/awt/j2d/Graphics2DImpl.java +++ b/libjava/gnu/awt/j2d/Graphics2DImpl.java @@ -105,12 +105,20 @@ public class Graphics2DImpl extends Graphics2D implements Cloneable public Object clone() { - Graphics2DImpl gfxCopy = (Graphics2DImpl) super.clone(); - AbstractGraphicsState stateCopy = - (AbstractGraphicsState) state.clone(); - gfxCopy.setState(stateCopy); - - return gfxCopy; + try + { + Graphics2DImpl gfxCopy = (Graphics2DImpl) super.clone(); + AbstractGraphicsState stateCopy = + (AbstractGraphicsState) state.clone(); + gfxCopy.setState(stateCopy); + + return gfxCopy; + } + catch (CloneNotSupportedException ex) + { + // This should never happen. + throw new InternalError (); + } } diff --git a/libjava/gnu/awt/xlib/XEventLoop.java b/libjava/gnu/awt/xlib/XEventLoop.java index 4d293208939..ad5e963437a 100644 --- a/libjava/gnu/awt/xlib/XEventLoop.java +++ b/libjava/gnu/awt/xlib/XEventLoop.java @@ -48,17 +48,8 @@ public class XEventLoop implements Runnable void postNextEvent() { - try - { - AWTEvent evt = getNextEvent(); - queue.postEvent(evt); - - } - catch (InterruptedException ie) - { - // FIXME: what now? - System.err.println(ie); - } + AWTEvent evt = getNextEvent(); + queue.postEvent(evt); } /** get next event. Will block until events become available. */ diff --git a/libjava/gnu/awt/xlib/XGraphics.java b/libjava/gnu/awt/xlib/XGraphics.java index 9f29fa5b94a..b8614023377 100644 --- a/libjava/gnu/awt/xlib/XGraphics.java +++ b/libjava/gnu/awt/xlib/XGraphics.java @@ -46,10 +46,18 @@ public class XGraphics implements Cloneable, DirectRasterGraphics public Object clone() { - XGraphics gfxCopy = (XGraphics) super.clone(); - gfxCopy.context = context.create(); - - return gfxCopy; + try + { + XGraphics gfxCopy = (XGraphics) super.clone(); + gfxCopy.context = context.create(); + + return gfxCopy; + } + catch (CloneNotSupportedException ex) + { + // This should never happen. + throw new InternalError (); + } } public void dispose() diff --git a/libjava/gnu/gcj/runtime/NameFinder.java b/libjava/gnu/gcj/runtime/NameFinder.java index 19820c1bd6b..0c358368390 100644 --- a/libjava/gnu/gcj/runtime/NameFinder.java +++ b/libjava/gnu/gcj/runtime/NameFinder.java @@ -154,18 +154,10 @@ public class NameFinder if (addr2line != null) { - try - { - addr2lineIn = new BufferedReader - (new InputStreamReader(addr2line.getInputStream())); - addr2lineOut = new BufferedWriter - (new OutputStreamWriter(addr2line.getOutputStream())); - } - catch (IOException ioe) - { - addr2line.destroy(); - addr2line = null; - } + addr2lineIn = new BufferedReader + (new InputStreamReader(addr2line.getInputStream())); + addr2lineOut = new BufferedWriter + (new OutputStreamWriter(addr2line.getOutputStream())); } } } 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); diff --git a/libjava/gnu/gcj/xlib/WMSizeHints.java b/libjava/gnu/gcj/xlib/WMSizeHints.java index 29344eee1eb..c0b198c58a7 100644 --- a/libjava/gnu/gcj/xlib/WMSizeHints.java +++ b/libjava/gnu/gcj/xlib/WMSizeHints.java @@ -27,12 +27,20 @@ public class WMSizeHints implements Cloneable protected native void finalize(); public Object clone() { - WMSizeHints hints = (WMSizeHints) super.clone(); - // In case of an exception before the stucture is copied. - hints.structure = null; - - hints.init(this); - return hints; + try + { + WMSizeHints hints = (WMSizeHints) super.clone(); + // In case of an exception before the stucture is copied. + hints.structure = null; + + hints.init(this); + return hints; + } + catch (CloneNotSupportedException ex) + { + // This should never happen. + throw new InternalError (); + } } public native void applyNormalHints(Window window); 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); |