[protobuf] How to construct a Builder from a FieldDescriptor with JavaType.MESSAGE

2015-01-26 Thread Jon Emerson
Hi There, I'm writing a utility to convert data stored in MongoDB back to protocol buffer format. My strategy is to look for each field in the protocol buffer definition, and if there's a matching field from my MongoDB object, then pull that data and set it on my protocol buffer builder.

Re: [protobuf] How to construct a Builder from a FieldDescriptor with JavaType.MESSAGE

2015-01-26 Thread Jon Emerson
Ah, thanks for the response! That wasn't it though - Calling .getRepeatedFieldBuilder(FieldDescriptor, int) against a Builder I'm just starting to populate will inevitably give only IndexOutOfBounds exceptions... Since nothing's set in the repeated field yet! But your response did give give me a