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

writeObject throws IllegalArgumentException with oneof label

    Details

    • Type: Bug
    • Status: Coding In Progress (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 4.4.0.Alpha4
    • Labels:
      None

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                anistor Nistor Adrian
                Reporter:
                ryanemerson Ryan Emerson
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: