[patch] fix to BufferedImage
Stephen Crawley
crawley@dstc.edu.au
Thu Sep 18 03:20:00 GMT 2003
graydon@redhat.com said:
> the assignment however cannot coincide with the declaration, because
> this is one of those "efficiency oriented" java APIs (pass in null if
> you want the callee to allocate the array), and writing a literal
> "null" in position of the "samples" argument degrades the type of the
> argument to Object, which ambiguates
Here's how you write the call to ensure that you get the correct
overloaded method:
samples = src.getPixels (x, y, w, h, (int[]) null);
-- Steve
More information about the Java-patches
mailing list