Skip to content

Use BufferRecycler provided by output (OutputStream, Writer) object if available #1195

Description

@cowtowncoder

(note: follow-up to #1193)

Currently BufferRecycler passed to JsonGenerator and JsonParser is explicitly accessed from RecyclerPool configured with JsonFactory. But there are cases where jackson-databind has already allocated an instance for use (currently mostly for output aggregation) and it would make sense to allow that to be used instead.
Let's do this by checking if input source/output target implements BufferRecycler.Gettable to expose pre-configured BufferRecycler.

EDIT: since this is only needed for output side (JsonGenerator), initial implementation is just for this.
If need arises can make changes to input side.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions