fix to Rectangle.java

graydon hoare graydon@redhat.com
Wed Jul 16 20:14:00 GMT 2003


hi,

this patch corrects the PathIterator generated by a Rectangle2D
object, in package java.awt.geom. it was previously judging itself
empty when it had nonzero content, and vice-versa.

-graydon


--- Rectangle2D.java.~1.6.~	2002-08-09 00:26:16.000000000 -0400
+++ Rectangle2D.java	2003-07-15 00:22:50.000000000 -0400
@@ -395,7 +395,7 @@
     return new PathIterator()
     {
       /** Current coordinate. */
-      private int current = (maxx >= minx && maxy >= miny) ? 6 : 0;
+      private int current = (maxx <= minx && maxy <= miny) ? 6 : 0;
 
       public int getWindingRule()
       {



More information about the Java-patches mailing list