This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [patch] fix to BufferedImage
- From: Tom Tromey <tromey at redhat dot com>
- To: graydon hoare <graydon at redhat dot com>
- Cc: classpath at gnu dot org, java-patches at gcc dot gnu dot org
- Date: 17 Sep 2003 10:01:37 -0600
- Subject: Re: [patch] fix to BufferedImage
- References: <8765jswg1b.fsf@dub.venge.net>
- Reply-to: tromey at redhat dot com
>>>>> "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