Hey,
These changes (committed) now pass a few of Intel's tests.
2006-07-18 Tania Bento <[EMAIL PROTECTED]>
* java/awt/GridLayout.java
(setHgap): Illegal Argument Exception should not be thrown if
hgap < 0.
(setVgap): Illegal Argument Exception should not be thrown if
vgap < 0.
(toString): Opening square braket ([) should appear before hgap
value, not the name of the class.
Index: java/awt/GridLayout.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/GridLayout.java,v
retrieving revision 1.15
diff -u -r1.15 GridLayout.java
--- java/awt/GridLayout.java 2 Jul 2005 20:32:25 -0000 1.15
+++ java/awt/GridLayout.java 18 Jul 2006 15:35:52 -0000
@@ -254,14 +254,11 @@
this.cols = newCols;
}
- /** Set the horizontal gap
+ /** Set the horizontal gap. An Exception is not thrown if hgap < 0.
* @param hgap The horizontal gap
- * @exception IllegalArgumentException If the hgap value is less than zero.
*/
public void setHgap (int hgap)
{
- if (hgap < 0)
- throw new IllegalArgumentException ("horizontal gap must be nonnegative");
this.hgap = hgap;
}
@@ -280,21 +277,18 @@
this.rows = newRows;
}
- /** Set the vertical gap.
+ /** Set the vertical gap. An Exception is not thrown if vgap < 0.
* @param vgap The vertical gap
- * @exception IllegalArgumentException If the vgap value is less than zero.
*/
public void setVgap (int vgap)
{
- if (vgap < 0)
- throw new IllegalArgumentException ("vertical gap must be nonnegative");
this.vgap = vgap;
}
/** Return String description of this object. */
public String toString ()
{
- return ("[" + getClass ().getName ()
+ return (getClass ().getName () + "["
+ ",hgap=" + hgap + ",vgap=" + vgap
+ ",rows=" + rows + ",cols=" + cols
+ "]");