As Jerry said, see issue 57:
http://code.google.com/p/protobuf/issues/detail?id=57
Summary: This is fixed in SVN by making setters themselves throw NPE if the
input is null. Some people think this is the wrong behavior, and that
setting a value to null should instead be equivalent to clearing it
See discussion here: http://code.google.com/p/protobuf/issues/detail?id=57
On Apr 1, 5:03 pm, Jim Sermersheim wrote:
> In the generated Java code, a typical Builder set method might look like
> this:
> public Builder setSomething(java.lang.String value) {
> result.hasSomething = tr
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,