Make MAX_ERROR_TOKEN_LENGTH configurable via ErrorReportConfiguration by JooHyukKim · Pull Request #1043 · FasterXML/jackson-core (original) (raw)

Ok yes this is better. I wish passing new configuration was not so awkward though, it is unfortunate to need to modify both ContentReference and (especially) IOContext. But perhaps that cannot be helped.

One thing that would help merging would, however, be splitting one set of change to be merged first:

  1. Add new ErrorReportConfiguration type with builder, unit test(s)
  2. Change TSFBuilder / JsonFactory to allow configuring and holding on to that config object

and then in a follow-up PR do the rest. This will be bit easier to merge cleanly; one problem are being JsonFactory that is somehow unlinked (git merge thinking it is deleted from master).

It would also be bit easier to maybe see if there's any way to minimize changes to ContentReference or IOContext.

I think easiest way might be to leave this PR as-is, create new "minimal" one from some of changes.