You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/06/06 06:53:50 UTC

[GitHub] [pulsar] yjshen opened a new issue #4488: [Schema][AVRO] Unable to read fields of java built-in types defined in POJO class

yjshen opened a new issue #4488: [Schema][AVRO] Unable to read fields of java built-in types defined in POJO class
URL: https://github.com/apache/pulsar/issues/4488
 
 
   **Describe the bug**
   `AvroSchema` and `GenericAvroSchema` cannot read POJO field's of java built-in types, `GenericAvroSchema` lose all java built-in fields' value when read, and `AvroSchema` will lose part of them,  `BitSet` for example.
   
   **To Reproduce**
   ``` java
   class Foo {
      boolean b;
      java.util.Date dt;
      java.util.BitSet bs;
   }
   
   Schema sa = Schema.AVRO(Foo.class);
   Schema sb = Schema.getSchema(a.getSchemaInfo());
   
   Consumer ca = client.newConsumer(a)....subscribe();
   Consumer cb = client.newConsumer(b)....subscribe();
   ```
   For `ca`, `dt` can be read, `bs` is empty
   For `cb`, both `dt` and `bs` is empty
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services