diff options
| author | fitzsim <fitzsim@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-11-14 22:44:29 +0000 |
|---|---|---|
| committer | fitzsim <fitzsim@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-11-14 22:44:29 +0000 |
| commit | da4947c852ade5471b6d41193f9e4f90584f079d (patch) | |
| tree | 955f4afc5b23ffbc8e11e301d1b66cb6716e3e7e /libjava/java/awt | |
| parent | 41821d4b77aba455d161278ffb75504e06f388d1 (diff) | |
| download | ppe42-gcc-da4947c852ade5471b6d41193f9e4f90584f079d.tar.gz ppe42-gcc-da4947c852ade5471b6d41193f9e4f90584f079d.zip | |
2003-11-14 Tom Fitzsimmons <fitzsim@redhat.com>
* java/awt/GridBagLayout.java (getLayoutDimensions): Return array of two
zero-length int arrays when layoutInfo is null.
(getLayoutWeights): Return array of two zero-length double arrays when
layoutInfo is null.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73622 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/awt')
| -rw-r--r-- | libjava/java/awt/GridBagLayout.java | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/libjava/java/awt/GridBagLayout.java b/libjava/java/awt/GridBagLayout.java index dd49a1cf905..7572c1d1d56 100644 --- a/libjava/java/awt/GridBagLayout.java +++ b/libjava/java/awt/GridBagLayout.java @@ -229,10 +229,15 @@ public class GridBagLayout */ public int[][] getLayoutDimensions () { + int[][] result = new int [2][]; if (layoutInfo == null) - return new int [2][]; + { + result[0] = new int[0]; + result[1] = new int[0]; + + return result; + } - int[][] result = new int [2][]; result [0] = new int [layoutInfo.cols]; System.arraycopy (layoutInfo.colWidths, 0, result [0], 0, layoutInfo.cols); result [1] = new int [layoutInfo.rows]; @@ -242,10 +247,15 @@ public class GridBagLayout public double[][] getLayoutWeights () { - if (layoutInfo == null) - return new double [2][]; - double[][] result = new double [2][]; + if (layoutInfo == null) + { + result[0] = new double[0]; + result[1] = new double[0]; + + return result; + } + result [0] = new double [layoutInfo.cols]; System.arraycopy (layoutInfo.colWeights, 0, result [0], 0, layoutInfo.cols); result [1] = new double [layoutInfo.rows]; |

