You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Avro compact deserializer bug - ID set to type #697
I would like to work on this one. Looking at AvroCompactFormat.java line 90, the fix is changing .withId(from.getType()) to .withId(from.getId()). I will also update AvroCompactFormatTest.java to use different values for type and id in the test event so this does not regress silently again.
Happy to open a PR with this fix if that sounds right.
Looks like accidental set of ID to type.
https://github.com/cloudevents/sdk-java/blob/main/formats/avro-compact/src/main/java/io/cloudevents/avro/compact/AvroCompactFormat.java#L90
Should be:
Test should be fixed as well. Using different values in type and ID of the test event would detect the issue.
https://github.com/cloudevents/sdk-java/blob/main/formats/avro-compact/src/test/java/io/cloudevents/avro/compact/AvroCompactFormatTest.java#L46