On Mon, Oct 12, 2020 at 1:45 PM Mark Derricutt <
ma...@talios.com> wrote:
>
> I’ve never really been a fan of APIs that have a dual pair of methods:
>
> new ObjectMapper().treeToValue(tree);
> new ObjectMapper().uncheckedTreeToValue(tree);
>
> but they can serve a purpose in situations like this. It does start to get rather verbose/wordy tho. If 3.0 is going to have a much larger exception rewrite, for those who want the relaxed behaviour now - would such a compromise be acceptable?
That's a good question. I must admit I am not big fan either, partly
since potential number of methods to duplicate is rather large.
At some point I was even contemplating idea of "UncheckedObjectMapper"
sub-class which would
simply override method without exceptions (as sub-classes may do).
This before realizing that in 3.0 we can make Jackson base exception
(`JacksonException`) unchecked, which avoids this problem altogether.
On plus side, change did not make it into release and I think my
immediate plan is simply to revert change from 2.x
-+ Tatu +-
> --
> You received this message because you are subscribed to the Google Groups "jackson-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
jackson-dev...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/jackson-dev/CALYGm1xtvLOh7h1mXEh_fhwy6eX2mX2szT1Er4Q%2BDCvej9tG3Q%40mail.gmail.com.