This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] fix to BufferedImage


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]