Hey,

These fixes are minor and fix failing Intel tests.  I have also
committed a mauve test (committed) for the Rectangle fixes.

Tania

2006-09-26  Tania Bento  <[EMAIL PROTECTED]>

        * java/awt/GridLayout.java
        (toString): There is no common before hgap.
        * java/awt/Rectangle.java
        (Rectangle(Rectangle)): Throw NPE if Rectangle is null.
        (Rectangle(Point, Rectangle)): Throw NPE if either Point or
        Rectangle is null.
        (Rectangle(Point)): Throw NPE if Point is null.
        (Rectangle(Dimension)): Throw NPE if Dimension is null.

Index: java/awt/GridLayout.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/GridLayout.java,v
retrieving revision 1.16
diff -u -r1.16 GridLayout.java
--- java/awt/GridLayout.java	18 Jul 2006 15:41:18 -0000	1.16
+++ java/awt/GridLayout.java	26 Sep 2006 19:13:22 -0000
@@ -289,7 +289,7 @@
   public String toString ()
   {
     return (getClass ().getName () + "["
-	    + ",hgap=" + hgap + ",vgap=" + vgap
+	    + "hgap=" + hgap + ",vgap=" + vgap
 	    + ",rows=" + rows + ",cols=" + cols
 	    + "]");
   }
Index: java/awt/Rectangle.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/Rectangle.java,v
retrieving revision 1.17
diff -u -r1.17 Rectangle.java
--- java/awt/Rectangle.java	4 Sep 2006 08:52:32 -0000	1.17
+++ java/awt/Rectangle.java	26 Sep 2006 19:13:22 -0000
@@ -124,6 +124,9 @@
    */
   public Rectangle(Rectangle r)
   {
+    if (r == null)
+      throw new NullPointerException();
+    
     x = r.x;
     y = r.y;
     width = r.width;
@@ -172,6 +175,9 @@
    */
   public Rectangle(Point p, Dimension d)
   {
+    if (p == null || d == null)
+      throw new NullPointerException();
+    
     x = p.x;
     y = p.y;
     width = d.width;
@@ -183,9 +189,13 @@
    * corner at the specified point and a width and height of zero.
    *
    * @param p the upper left corner of the rectangle
+   * @throws NullPointerException if p is null
    */
   public Rectangle(Point p)
   {
+    if (p == null)
+      throw new NullPointerException();
+    
     x = p.x;
     y = p.y;
   }
@@ -196,9 +206,13 @@
    * by the specified dimension.
    *
    * @param d the width and height of the rectangle
+   * @throws NullPointerException if d is null
    */
   public Rectangle(Dimension d)
   {
+    if (d == null)
+      throw new NullPointerException();
+    
     width = d.width;
     height = d.height;
   }

Reply via email to