From eeb7c5fae3caf508fe5a6021ce700630632c6a02 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 6 May 2011 15:10:42 +0200 Subject: Graph: more clone() cleanup. - throw InternalError() for CloneNotSupportedException case, which never happens - AffineTransform clone() uses covariant return type as well, ie AffineTransform --- src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java | 2 +- src/jogl/classes/com/jogamp/graph/geom/Outline.java | 2 +- src/jogl/classes/jogamp/graph/geom/plane/AffineTransform.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java b/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java index fa8494d4e..9a5d86fc2 100755 --- a/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java +++ b/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java @@ -459,7 +459,7 @@ public class OutlineShape implements Comparable { OutlineShape o; try { o = (OutlineShape) super.clone(); - } catch (CloneNotSupportedException e) { return null; /* never, ever */ } + } catch (CloneNotSupportedException e) { throw new InternalError(); } o.bbox = bbox.clone(); o.outlines = new ArrayList(outlines.size()); for(int i=0; i { Outline o; try { o = (Outline) super.clone(); - } catch (CloneNotSupportedException e) { return null; /* never, ever */ } + } catch (CloneNotSupportedException e) { throw new InternalError(); } o.bbox = bbox.clone(); o.vertices = new ArrayList(vertices.size()); for(int i=0; i