See discussion here: http://code.google.com/p/protobuf/issues/detail?id=57
On Apr 1, 5:03 pm, Jim Sermersheim <j...@fusionio.com> wrote: > In the generated Java code, a typical Builder set method might look like > this: > public Builder setSomething(java.lang.String value) { > result.hasSomething = true; > result.something_ = value; > return this; > } > > Later, when we build the message and then serialize it, the > CodedOutputStream.compute*Size() will throw NullPointerException because > the value is null. Should the Builder.set* methods check for null and > not set result.has* to true? > > CONFIDENTIAL > > This document and attachments contain information from Fusion-io, Inc. which > is confidential and/or legally privileged. > The information is intended only for the use of the individual or entity > named on this transmission. > If you are not the intended recipient, you are hereby notified that any > disclosure, copying, distribution or taking of any > action in reliance on the contents of this emailed information is strictly > prohibited, and that the documents should be returned to Fusion-io, Inc. > immediately. > In this regard, if you have received this email in error, please notify us by > return email immediately. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to protobuf@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 -~----------~----~----~----~------~----~------~--~---