square/wire — pull request #27 by yhpark (2013-09-04 18:28:36+00:00)
Title: Remove defaults from message type fields

When you have a Message(A) with field of other Message(B) which contains a required field, you get a runtime error at some point. More precisely, when A is first loaded by class loader, the `private static B DEFAULT_* = getDefaultInstance(B.class)` is called, `B.build()` is trying to create new B instance whose all fields are null. So `checkRequiredFields()` in `B.build()` throws an exception complaining all the required fields are not set.

Soon I realized that all the default `private static ~ DEFAULT_ ...` fields of message types (except for enum and repeated) don't have any use since Message fields can't have any defaults from the beginning.
It seemed I should also remove the `Message.getDefaultInstance()` method itself since it could always lead to runtime exception for same reason anytime.

p.s. If you're going to merge, can you merge with this PR directly? I'll do any extra works to be done. Thanks!