[jira] [Updated] (AVRO-1308) Don't call hasField on a repeated message
[ https://issues.apache.org/jira/browse/AVRO-1308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Zesch updated AVRO-1308: -- Attachment: AVRO-1308.patch Updated AVRO-1308.patch. I've changed test.proto and TestProtobuf.java to expose the bug. I've also regenerated Test.java When testing the original AVRO-1308.patch after bug 1309 was resolved, I encountered an issue. A repeated field with a count of 0 should return an empty list instead of null. Returning null results in a NullPointerException being thrown. This fix is included in the updated patch. Don't call hasField on a repeated message - Key: AVRO-1308 URL: https://issues.apache.org/jira/browse/AVRO-1308 Project: Avro Issue Type: Bug Components: java Reporter: Steve Zesch Attachments: AVRO-1308.patch, AVRO-1308.patch If the hasField method of a Message object is called with an argument that is a repeatable field, an exception is thrown. The ProtobufData getField method does not check to see if a field is repeatable before calling hasField. protobuf hasField Java doc: https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/MessageOrBuilder#hasField(com.google.protobuf.Descriptors.FieldDescriptor) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AVRO-1308) Don't call hasField on a repeated message
[ https://issues.apache.org/jira/browse/AVRO-1308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Doug Cutting updated AVRO-1308: --- Resolution: Fixed Fix Version/s: 1.7.5 Assignee: Steve Zesch Status: Resolved (was: Patch Available) I committed this. Don't call hasField on a repeated message - Key: AVRO-1308 URL: https://issues.apache.org/jira/browse/AVRO-1308 Project: Avro Issue Type: Bug Components: java Reporter: Steve Zesch Assignee: Steve Zesch Fix For: 1.7.5 Attachments: AVRO-1308.patch, AVRO-1308.patch, AVRO-1308.patch If the hasField method of a Message object is called with an argument that is a repeatable field, an exception is thrown. The ProtobufData getField method does not check to see if a field is repeatable before calling hasField. protobuf hasField Java doc: https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/MessageOrBuilder#hasField(com.google.protobuf.Descriptors.FieldDescriptor) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AVRO-1308) Don't call hasField on a repeated message
[ https://issues.apache.org/jira/browse/AVRO-1308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Zesch updated AVRO-1308: -- Status: Patch Available (was: Open) Check to see if a field is repeated. Don't call hasField on a repeated message - Key: AVRO-1308 URL: https://issues.apache.org/jira/browse/AVRO-1308 Project: Avro Issue Type: Bug Components: java Reporter: Steve Zesch Attachments: AVRO-1308.patch If the hasField method of a Message object is called with an argument that is a repeatable field, an exception is thrown. The ProtobufData getField method does not check to see if a field is repeatable before calling hasField. protobuf hasField Java doc: https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/MessageOrBuilder#hasField(com.google.protobuf.Descriptors.FieldDescriptor) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AVRO-1308) Don't call hasField on a repeated message
[ https://issues.apache.org/jira/browse/AVRO-1308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Zesch updated AVRO-1308: -- Attachment: (was: cnfe_protobuf_stack_trace.txt) Don't call hasField on a repeated message - Key: AVRO-1308 URL: https://issues.apache.org/jira/browse/AVRO-1308 Project: Avro Issue Type: Bug Components: java Reporter: Steve Zesch Attachments: AVRO-1308.patch If the hasField method of a Message object is called with an argument that is a repeatable field, an exception is thrown. The ProtobufData getField method does not check to see if a field is repeatable before calling hasField. protobuf hasField Java doc: https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/MessageOrBuilder#hasField(com.google.protobuf.Descriptors.FieldDescriptor) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira