jerrypeng commented on issue #3741: POJO AvroSchema always allowNull
URL: https://github.com/apache/pulsar/issues/3741#issuecomment-469168842
 
 
   @sijie I don't quite follow.  If a class has a field "Integer" than the 
field shoulda allow vs if the field is "int" then it shouldn't:
   
   ```
    public static class Foo {
           int field1;
           Integer field2;
       }
   
           log.info("{}", new 
String(AvroSchema.of(Foo.class).getSchemaInfo().getSchema()));
   
   ```
   
   produces:
   
   ```
   
{"type":"record","name":"Foo","namespace":"org.company.Test4$","fields":[{"name":"field1","type":"int"},{"name":"field2","type":["null","int"],"default":null}]}
   
   ```
   
   which is correct.  Am I missing something?
   
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to