From b0b255613998f8f69aff201f1a5d58f079cd59fa Mon Sep 17 00:00:00 2001 From: tromey Date: Sun, 10 Nov 2002 17:35:13 +0000 Subject: [PATCH] * java/awt/GridLayout.java (setColumns): Check newCols, not cols. (setRows): Check newRows, not rows. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58984 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/ChangeLog | 3 +++ libjava/java/awt/GridLayout.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 3024eb0..b2a035a 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,8 @@ 2002-11-10 Tom Tromey + * java/awt/GridLayout.java (setColumns): Check newCols, not cols. + (setRows): Check newRows, not rows. + * jni.cc (_Jv_GetJNIEnvNewFrame): Set env->ex in all cases. 2002-11-09 Tom Tromey diff --git a/libjava/java/awt/GridLayout.java b/libjava/java/awt/GridLayout.java index 58145f8..51e012a 100644 --- a/libjava/java/awt/GridLayout.java +++ b/libjava/java/awt/GridLayout.java @@ -245,7 +245,7 @@ public class GridLayout implements LayoutManager, Serializable */ 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 class GridLayout implements LayoutManager, Serializable */ 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"); -- 2.7.4