[Patch][gui] java.awt.image.DataBufferUShort
Michael Koch
konqueror@gmx.de
Wed Nov 17 07:51:00 GMT 2004
Hi list,
I just commited the attached patch to fix 2 more mauve testcases.
Michael
2004-11-17 Michael Koch <konqueror@gmx.de>
* java/awt/image/DataBufferShort.java: Fixed file header.
* java/awt/image/DataBufferUShort.java: Likewise.
(DataBufferUShort): Throw NullPointerException if dataArray is null.
-------------- next part --------------
Index: java/awt/image/DataBufferShort.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/image/DataBufferShort.java,v
retrieving revision 1.1.16.3
diff -u -r1.1.16.3 DataBufferShort.java
--- java/awt/image/DataBufferShort.java 16 Oct 2004 15:30:50 -0000 1.1.16.3
+++ java/awt/image/DataBufferShort.java 17 Nov 2004 07:41:18 -0000
@@ -1,4 +1,5 @@
-/* Copyright (C) 2004 Free Software Foundation
+/* DataBufferShort.java --
+ Copyright (C) 2004 Free Software Foundation
This file is part of GNU Classpath.
Index: java/awt/image/DataBufferUShort.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/image/DataBufferUShort.java,v
retrieving revision 1.5.18.2
diff -u -r1.5.18.2 DataBufferUShort.java
--- java/awt/image/DataBufferUShort.java 16 Oct 2004 15:30:50 -0000 1.5.18.2
+++ java/awt/image/DataBufferUShort.java 17 Nov 2004 07:41:18 -0000
@@ -1,4 +1,5 @@
-/* Copyright (C) 2000, 2002 Free Software Foundation
+/* DataBufferUShort.java --
+ Copyright (C) 2000, 2002, 2004 Free Software Foundation
This file is part of GNU Classpath.
@@ -87,10 +88,14 @@
*
* @param dataArray the data bank.
* @param size the number of elements in the data bank.
+ *
+ * @throws NullPointerException if dataArray is null
*/
public DataBufferUShort(short[] dataArray, int size)
{
super(TYPE_USHORT, size, 1, 0);
+ if (dataArray == null)
+ throw new NullPointerException();
bankData = new short[1][];
data = dataArray;
bankData[0] = data;
@@ -103,10 +108,14 @@
* @param dataArray the data bank.
* @param size the number of elements in the data bank.
* @param offset the offset to the first element in the array.
+ *
+ * @throws NullPointerException if dataArray is null
*/
public DataBufferUShort(short[] dataArray, int size, int offset)
{
super(TYPE_USHORT, size, 1, offset);
+ if (dataArray == null)
+ throw new NullPointerException();
bankData = new short[1][];
data = dataArray;
bankData[0] = data;
More information about the Java-patches
mailing list