mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-01-29 09:32:38 +00:00
1605775be0
When creating a MessageDescriptor for a legacy message with a Descriptor method, we call that method on the type's zero value to get the message's DescriptorProto. Some existing dynamic message types have a Descriptor method which panics in this case. Catch the panic and continue as if the Descriptor method wasn't present. Change-Id: I98d4625d6917cc1ec25737e5670a443f5d02a404 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/206637 Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>