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


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