On Jun 29, 2010, at 17:49 , Josh Hartman wrote:
"public Builder ensure$capitalized_name$Capacity(int minCapacity) {\n"
        "  if (result.$name$_.isEmpty()) {\n"
" result.$name$_ = new java.util.ArrayList<$boxed_type $>(minCapacity);\n"


I think the problem is that in the empty case, the next call to add* will re-create the ArrayList as empty, which defeats the call to ensureCapacity. Try hacking something in that method to make this work (check the type?)

Evan

--
Evan Jones
http://evanjones.ca/

--
You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to