Status: WorkingAsIntended

Comment #1 on issue 416 by jas...@google.com: HasField is throwing UnsupportedOperationException on repeated fields

Do you really get an UnsupportedOperationException? You should get IllegalArgumentException. Docs say that hasField throws exception on repeated fields: https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/MessageOrBuilder.html#hasField(com.google.protobuf.Descriptors.FieldDescriptor)

repeated fields don't have a has accessor, you should call getRepeatedFieldCount() instead.

You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to