FasterXML / jackson-dataformats-binary

Uber-project for standard Jackson binary format backends: avro, cbor, ion, protobuf, smile
Apache License 2.0
310 stars 133 forks source link

[Avro] Fix unit test for untyped map schema generation. #282

Closed MichalFoksa closed 3 years ago

MichalFoksa commented 3 years ago

Since 2.13, UnsupportedOperationException is thrown instead of InvalidDefinitionException.

Fixes #281

cowtowncoder commented 3 years ago

Thank you for digging into this! Ideally, I think, we should try to avoid exposing non-Jackson RuntimeExceptions, so it'd be good to see if this could be changed. This because users are less likely to catch these exceptions (wrt jackson's declared ones; type of which will change in 3.x to become unchecked but still with common JacksonException base type).

Not sure if exception 2.12 uses is optimal, but it seems better than UnsupportedOperationException.

I'll merge this first to stop failing CI and see if I can find time to further improve handling.