Index: modules/awt/src/main/java/common/java/awt/geom/Area.java =================================================================== --- modules/awt/src/main/java/common/java/awt/geom/Area.java (revision 463626) +++ modules/awt/src/main/java/common/java/awt/geom/Area.java (working copy) @@ -24,6 +24,7 @@ import java.awt.Shape; import java.awt.geom.PathIterator; import java.awt.geom.Rectangle2D; +import java.util.NoSuchElementException; public class Area implements Shape, Cloneable { @@ -32,6 +33,33 @@ */ Shape s; + class NullIterator implements PathIterator { + + NullIterator() { + } + + public int getWindingRule() { + return WIND_NON_ZERO; + } + + public boolean isDone() { + return true; + } + + public void next() { + // nothing + } + + public int currentSegment(double[] coords) { + throw new NoSuchElementException("Iiterator out of bounds"); + } + + public int currentSegment(float[] coords) { + throw new NoSuchElementException("Iiterator out of bounds"); + } + + } + public Area() { } @@ -88,11 +116,11 @@ } public PathIterator getPathIterator(AffineTransform t) { - return s == null ? null : s.getPathIterator(t); + return s == null ? new NullIterator() : s.getPathIterator(t); } public PathIterator getPathIterator(AffineTransform t, double flatness) { - return s == null ? null : s.getPathIterator(t, flatness); + return s == null ? new NullIterator() : s.getPathIterator(t, flatness); } public void add(Area area) {