http://3.latest.galgwt-reviews.appspot.com/41603/diff/1/2
File gears/src/com/google/gwt/gears/client/blobbuilder/BlobBuilder.java
(right):

http://3.latest.galgwt-reviews.appspot.com/41603/diff/1/2#newcode43
Line 43: public void append(byte[] bytes) {
On 2009/07/06 13:26:56, zundel wrote:
> I think you could wrap up append (byte c) and this one with a
prototype like:

> append (byte... c)

> I'm not sure what drawbacks there might be.

I did some checking around and maybe this is not such a good idea.  The
Java tutorial on varargs says: "Generally speaking, you should not
overload a varargs method, or it will be difficult for programmers to
figure out which overloading gets called."  I played around with the
ArrayHelper class writing a unit tests in a similar situation and found
that the problem isn't just with programmers, the compiler seems to get
confused as well!

http://3.latest.galgwt-reviews.appspot.com/41603

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to