FYI: [gui] Rectangle fixlet.

Mark Wielaard mark@klomp.org
Tue Aug 17 13:49:00 GMT 2004


Hi,

I am committing the following Rectangle fixlet from GNU Classpath
to the gui branch.

2004-08-14  Mark Wielaard  <mark@klomp.org>

       * java/lang/Rectangle.java (intersects): Check r.width and r.height
       first.

Cheers,

Mark

--- java/awt/Rectangle.java     3 Feb 2004 17:17:29 -0000       1.11
+++ java/awt/Rectangle.java     14 Aug 2004 11:09:12 -0000
@@ -542,7 +542,7 @@
    */
   public boolean intersects(Rectangle r)
   {
-    return width > 0 && height > 0 && r.width > 0 && r.height > 0
+    return r.width > 0 && r.height > 0 && width > 0 && height > 0
       && r.x < x + width && r.x + r.width > x
       && r.y < y + height && r.y + r.height > y;
   }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20040817/8fee1a6e/attachment.sig>


More information about the Java-patches mailing list