[protobuf] Re: Issue 460 in protobuf: Add isDefault() to Java Message interface as a fast means to verify whether it is a default instance

2013-02-20 Thread protobuf
Comment #8 on issue 460 by dav.co...@gmail.com: Add isDefault() to Java Message interface as a fast means to verify whether it is a default instance http://code.google.com/p/protobuf/issues/detail?id=460 1. getSerializedSize() is an expensive operation; yeah, it memoizes itself, but after

[protobuf] Re: Issue 460 in protobuf: Add isDefault() to Java Message interface as a fast means to verify whether it is a default instance

2013-02-20 Thread protobuf
Comment #9 on issue 460 by dav.co...@gmail.com: Add isDefault() to Java Message interface as a fast means to verify whether it is a default instance http://code.google.com/p/protobuf/issues/detail?id=460 One -- You received this message because this project is configured to send all issue

[protobuf] Re: Issue 460 in protobuf: Add isDefault() to Java Message interface as a fast means to verify whether it is a default instance

2013-02-20 Thread protobuf
Comment #10 on issue 460 by dav.co...@gmail.com: Add isDefault() to Java Message interface as a fast means to verify whether it is a default instance http://code.google.com/p/protobuf/issues/detail?id=460 Forgot to mention the case for Builders, too. When you build, you want to know

[protobuf] Re: Issue 460 in protobuf: Add isDefault() to Java Message interface as a fast means to verify whether it is a default instance

2013-02-20 Thread protobuf
Comment #11 on issue 460 by xiaof...@google.com: Add isDefault() to Java Message interface as a fast means to verify whether it is a default instance http://code.google.com/p/protobuf/issues/detail?id=460 I agree that an isEmpty() method might be more intuitive than getSerializedSize() ==

[protobuf] Re: Issue 460 in protobuf: Add isDefault() to Java Message interface as a fast means to verify whether it is a default instance

2013-02-19 Thread protobuf
Comment #4 on issue 460 by dav.co...@gmail.com: Add isDefault() to Java Message interface as a fast means to verify whether it is a default instance http://code.google.com/p/protobuf/issues/detail?id=460 1. Call it isEmpty instead, fine. However, how would you efficiently check whether a

[protobuf] Re: Issue 460 in protobuf: Add isDefault() to Java Message interface as a fast means to verify whether it is a default instance

2013-02-19 Thread protobuf
Comment #5 on issue 460 by xiaof...@google.com: Add isDefault() to Java Message interface as a fast means to verify whether it is a default instance http://code.google.com/p/protobuf/issues/detail?id=460 You can check if a message is empty using getSerializedSize() == 0. I don't see why

[protobuf] Re: Issue 460 in protobuf: Add isDefault() to Java Message interface as a fast means to verify whether it is a default instance

2013-02-19 Thread protobuf
Comment #6 on issue 460 by dav.co...@gmail.com: Add isDefault() to Java Message interface as a fast means to verify whether it is a default instance http://code.google.com/p/protobuf/issues/detail?id=460 looks like a hack to me. Also, with lazy fields you will either get it wrong, or will

[protobuf] Re: Issue 460 in protobuf: Add isDefault() to Java Message interface as a fast means to verify whether it is a default instance

2013-02-19 Thread protobuf
Comment #7 on issue 460 by xiaof...@google.com: Add isDefault() to Java Message interface as a fast means to verify whether it is a default instance http://code.google.com/p/protobuf/issues/detail?id=460 getSerializedSize() will force lazy fields to be unpacked? and even get it wrong? How

[protobuf] Re: Issue 460 in protobuf: Add isDefault() to Java Message interface as a fast means to verify whether it is a default instance

2013-02-18 Thread protobuf
Updates: Labels: -Type-Defect -Priority-Medium Type-Enhancement Priority-Low Comment #1 on issue 460 by xiaof...@google.com: Add isDefault() to Java Message interface as a fast means to verify whether it is a default instance http://code.google.com/p/protobuf/issues/detail?id=460