[protobuf] setXxxIfNotNull, getXxxOrNull or something along the lines

2009-12-26 Thread Joern Huxhorn
Hi everyone. My current code is cluttered with repeated String str=x.getFoo(); if(str != null) { builder.setFoo(str); } since the setFoo method of builder throws an NPE if one is trying to set null. How about adding additional generated setFooIfNotNull (or something briefer with the same in

Re: [protobuf] setXxxIfNotNull, getXxxOrNull or something along the lines

2009-12-26 Thread Kenton Varda
This has been suggested before. The critical question is: how much will this increase the size of the resulting class files? If someone could implement this and tell me how much it affects unittest.proto, for example, then we could make a decision. The generated code is too big already so we ca

[protobuf] Compiling with Debug

2009-12-26 Thread Thomas Johnson
I've got a protobuf file that for some reason can't be loaded using ParseFromIStream. The function just returns false, without printing any error, and seems to deserialize only part of the message. How can I compile a debug version of protobuf (i.e. -O0 -ggdb3) to step through the code and find out