[patch] fix to BufferedImage

Tom Tromey tromey@redhat.com
Wed Sep 17 16:11:00 GMT 2003


>>>>> "graydon" == graydon hoare <graydon@redhat.com> writes:

graydon> 2003-09-16  Graydon Hoare  <graydon@redhat.com>
graydon> 	* java/awt/BufferedImage.java (setData): Support non-component
graydon> 	sample models.
graydon> 	(getData): Same.

This is ok.  There's a couple style nits though.

graydon> +        // slower path
graydon> +        int samples[] = null;
graydon> +        samples = src.getPixels (x, y, w, h, samples);

The `null' here is redundant; there are a couple of these.
I'd either do the assignment and declaration at once, or just not
initialize samples.  (In java this is always safe due to the definite
assignment rules.)

Tom



More information about the Java-patches mailing list