public inbox for mauve-patches@sourceware.org
 help / color / mirror / Atom feed
* Patch: FYI: New test exposing a NPE in java.awt.image.SampleModel.getPixels
@ 2005-06-13 18:53 Ziga Mahkovec
  0 siblings, 0 replies; only message in thread
From: Ziga Mahkovec @ 2005-06-13 18:53 UTC (permalink / raw)
  To: mauve-patches

There's a typo in SampleModel.getPixels causing NullPointerExceptions to
be thrown.

-- 
Ziga

2005-06-13  Ziga Mahkovec  <ziga.mahkovec@klika.si>

	* gnu/testlet/java/awt/image/SinglePixelPackedSampleModel/getPixels.java:
	Added new test exposing a NPE in SampleModel.getPixels.

Index: gnu/testlet/java/awt/image/SinglePixelPackedSampleModel/getPixels.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/awt/image/SinglePixelPackedSampleModel/getPixels.java,v
retrieving revision 1.1
diff -u -r1.1 getPixels.java
--- gnu/testlet/java/awt/image/SinglePixelPackedSampleModel/getPixels.java	15 Oct 2004 23:44:08 -0000	1.1
+++ gnu/testlet/java/awt/image/SinglePixelPackedSampleModel/getPixels.java	13 Jun 2005 18:36:27 -0000
@@ -135,6 +135,17 @@
     {
       harness.check(true);
     }
+    
+    // check other array types
+    try
+    {
+      float[] samples1 = m1.getPixels(0, 0, 1, 1, (float[]) null, db);
+      harness.check(true);
+    }
+    catch (NullPointerException e) 
+    {
+      harness.check(false);
+    }
   }
 }
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-06-13 18:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-13 18:53 Patch: FYI: New test exposing a NPE in java.awt.image.SampleModel.getPixels Ziga Mahkovec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).