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 Jones

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 
For more options, visit this group at 

Reply via email to