sdk-java
sdk-java copied to clipboard
Avro compact deserializer bug - ID set to type
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:
.withId(from.getId())
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
@pawel-boguski-ds would you be willing to contribute a fix?
Sorry, but probably I will not find time for this.