The JsonToAvroConverter Java utility class is currently unable to parse an AVRO field of type "int" and logical type "date" (corresponding to the LocalDate Java type).
Indeed, in the populateFieldInRecordWithCorrespondingType Java method at line 214, there is no check on the AVRO field logical type :
Expected behavior
The corresponding Java field (of type LocalDate) should be set with the right value.
Environment
Java version: 17
Spring Boot version: 3.1.1
KStreamplify version: 1.0.1
Steps taken to try and solve the problem
Run a unit test case and make it fail
Add a check on the AVRO field logical type
Run again the unit test case and make it succeed
Additional context
Some AVRO schemas used at Michelin contain fields of type "int" and logical type "date" (corresponding to the LocalDate Java type).
Please note that the issue described above also applies to an AVRO field of of type "int" and logical type "time-millis" (corresponding to the LocalTime Java type), among other date / time AVRO field types.
Describe the bug
The
JsonToAvroConverter
Java utility class is currently unable to parse an AVRO field of type "int" and logical type "date" (corresponding to theLocalDate
Java type).Indeed, in the
populateFieldInRecordWithCorrespondingType
Java method at line 214, there is no check on the AVRO field logical type :Expected behavior
The corresponding Java field (of type
LocalDate
) should be set with the right value.Environment
Steps taken to try and solve the problem
Additional context
Some AVRO schemas used at Michelin contain fields of type "int" and logical type "date" (corresponding to the
LocalDate
Java type).