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
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
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
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() ==
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
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
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
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
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