Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-1308

Don't call hasField on a repeated message

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.5
    • Component/s: java
    • Labels:
      None

      Description

      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)

        Attachments

        1. AVRO-1308.patch
          29 kB
          Doug Cutting
        2. AVRO-1308.patch
          19 kB
          Steve Zesch
        3. AVRO-1308.patch
          0.7 kB
          Steve Zesch

          Activity

            People

            • Assignee:
              szesch Steve Zesch
              Reporter:
              szesch Steve Zesch
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: