On Tue, 2006-06-13 at 15:01 -0400, Lillian Angel wrote:
> On Tue, 2006-06-13 at 12:16 -0600, Tom Tromey wrote:
> > >>>>> "Lillian" == Lillian Angel <[EMAIL PROTECTED]> writes:
> > 
> > Lillian> The JDK doesnt care if the ImageProducer is null when passed to the
> > Lillian> constructor.
> > 
> > Lillian> -    if (ip == null)
> > Lillian> -      throw new NullPointerException("The ImageProducer must not 
> > be null.");
> > 
> > In cases like this it is nice to have a comment, either in the
> > javadoc or in the code, explaining what happens when ip==null.
> > That way nobody will be tempted to add the check back in later.
> > 
> 
> Good idea.
Attached is the new patch.

> 
> 2006-06-13  Lillian Angel  <[EMAIL PROTECTED]>
> 
>         * java/awt/image/PixelGrabber.java
>         (PixelGrabber): Added to API documentation.
> 
> 
> 
> 
> > Tom
Index: java/awt/image/PixelGrabber.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/image/PixelGrabber.java,v
retrieving revision 1.16
diff -u -r1.16 PixelGrabber.java
--- java/awt/image/PixelGrabber.java	13 Jun 2006 14:18:18 -0000	1.16
+++ java/awt/image/PixelGrabber.java	13 Jun 2006 18:59:52 -0000
@@ -112,7 +112,8 @@
    * in the grab rectangle will be stored at
    * <code>pix[(n - y) * scansize + (m - x) + off]</code>.
    *
-   * @param ip the ImageProducer from which to grab pixels
+   * @param ip the ImageProducer from which to grab pixels. This can
+   * be null.
    * @param x the x coordinate of the grab rectangle's top-left pixel,
    * specified relative to the top-left corner of the image produced
    * by <code>ip</code>

Reply via email to