This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: AWT fixlet
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 10 Nov 2002 10:27:51 -0700
- Subject: Patch: FYI: AWT fixlet
- Reply-to: tromey at redhat dot com
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");