Uploaded image for project: 'ProtoStream'
  1. ProtoStream
  2. IPROTO-63

writeObject throws IllegalArgumentException with oneof label

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • None
    • None
    • DataGrid Sprint #30

    Description

      The below schema results in the following exception:

      Schema:

      message EntryVersion {
          oneof version {
              NumericVersion numeric = 1;
              ClusteredVersion clustered = 2;
          }
      //    optional NumericVersion numeric = 1;
      //    optional ClusteredVersion clustered = 2;
      }
      
      message NumericVersion {
          required int64 version = 1;
      }
      
      message ClusteredVersion {
          required int64 version = 1;
          required int32 topology = 2;
      }
      

      Exception:

      java.lang.IllegalArgumentException: Declared field type is not a message or an enum : numeric
      

      It seems this is caused because the type for the field "numeric" is null in the associated FieldDescriptor object that is retrieved in the writeObject impl.

      If the oneof label is replaced with the commented optional fields, the marshallers work as expected.

      Attachments

        Activity

          People

            fercoli@redhat.com Fabio Massimo Ercoli
            remerson@redhat.com Ryan Emerson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: