After update to jackson3
SchemaRegistry.getSchema()
method was not updated to catch JacksonException and still catches IOException.
When passing invalid json to this method JacksonException is emitted. In version 2.x it was converted to SchemaException.
I prepared an example PR that fixes this issue. I did not want to change api contract in Schema.validate() methods, they returned UncheckedIOException for jackson thrown IOException.
This leads to somehow ugly construction:
} catch (JacksonException e) {
throw new UncheckedIOException(new IOException("Invalid input", e));
}
Please let me know if You would prefer to loosen that backward compatiblity and then I can simple let the Jackson exception be thrown. (but that could lead to incompatiblity similiar to mine for other people).
After update to jackson3
method was not updated to catch JacksonException and still catches IOException.
When passing invalid json to this method JacksonException is emitted. In version 2.x it was converted to SchemaException.
I prepared an example PR that fixes this issue. I did not want to change api contract in Schema.validate() methods, they returned UncheckedIOException for jackson thrown IOException.
This leads to somehow ugly construction:
Please let me know if You would prefer to loosen that backward compatiblity and then I can simple let the Jackson exception be thrown. (but that could lead to incompatiblity similiar to mine for other people).