Patch: FYI: AWT fixlet
Tom Tromey
tromey@redhat.com
Sun Nov 10 09:35:00 GMT 2002
I'm checking this in.
This fixes an obvious bug in AWT.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* java/awt/GridLayout.java (setColumns): Check newCols, not cols.
(setRows): Check newRows, not rows.
Index: java/awt/GridLayout.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/GridLayout.java,v
retrieving revision 1.8
diff -u -r1.8 GridLayout.java
--- java/awt/GridLayout.java 10 Nov 2002 00:16:42 -0000 1.8
+++ java/awt/GridLayout.java 10 Nov 2002 17:34:42 -0000
@@ -245,7 +245,7 @@
*/
public void setColumns (int newCols)
{
- if (cols < 0)
+ if (newCols < 0)
throw new IllegalArgumentException ("number of columns cannot be negative");
if (newCols == 0 && rows == 0)
throw new IllegalArgumentException ("number of rows is already 0");
@@ -271,7 +271,7 @@
*/
public void setRows (int newRows)
{
- if (rows < 0)
+ if (newRows < 0)
throw new IllegalArgumentException ("number of rows cannot be negative");
if (newRows == 0 && cols == 0)
throw new IllegalArgumentException ("number of columns is already 0");
More information about the Java-patches
mailing list