Hey,

According to Java's API, setHgap and setVgap do not throw an Illegal
Argument Exception if hgap or vgap are negative values.  

Two Intel tests now pass on Classpath
(test.java.awt.FlowLayoutTest.testGetSetHgap() and
test.java.awt.FlowLayoutTest.testGetSetVgap()).

Could someone please comment on and/or approve this patch.

Thanks.
Tania

2006-07-14  Tania Bento  <[EMAIL PROTECTED]>
        
        * java/awt/FlowLayout.java
        (setHgap): Illegal Argument Exception should not be 
        thrown if hgap has a negative value.
        (setVgap): Illegal Argument Exception should not be
        thrown if vgap has a negative value.
Index: java/awt/FlowLayout.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/FlowLayout.java,v
retrieving revision 1.16
diff -u -r1.16 FlowLayout.java
--- java/awt/FlowLayout.java	18 Aug 2005 14:08:43 -0000	1.16
+++ java/awt/FlowLayout.java	14 Jul 2006 14:09:44 -0000
@@ -282,8 +282,6 @@
    */
   public void setHgap (int hgap)
   {
-    if (hgap < 0)
-      throw new IllegalArgumentException ("horizontal gap must be nonnegative");
     this.hgap = hgap;
   }
 
@@ -294,8 +292,6 @@
    */
   public void setVgap (int vgap)
   {
-    if (vgap < 0)
-      throw new IllegalArgumentException ("vertical gap must be nonnegative");
     this.vgap = vgap;
   }
 

Reply via email to