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

Fixes wrapping of IonException with StreamReadException #314

Closed popematt closed 2 years ago

popematt commented 2 years ago

Fixes wrapping of IonException with StreamReadException.

When this patch was merged from 2.14 to master for #311, the calls to wrapError(...) were replaced with calls to _constructReadException(...).

However, the behavior of these two methods is not the same—_wrapError(...) throws the new exception whereas _constructReadException(...) returns the new exception.

This PR adds the necessary throws in front of the calls to _constructReadException(...) in IonParser.

cowtowncoder commented 2 years ago

Lol. Yes, definitely my bad. Thank you for pointing out the obvious problem & providing the fix.

A bit embarrassing since I have done conversions earlier and forgot this obvious difference.