Skip to content

Do not clear aggregated contents of TextBuffer when releaseBuffers() called #606

@cowtowncoder

Description

@cowtowncoder

(background issue: FasterXML/jackson-databind#2635)

When a JsonParser is closed, buffers associated with it are deallocated, since some of them are recycled. This works fine when caller controls closing directly, but there are cases where this occurs automatically -- for example, when Jackson databind ObjectMapper manages process, when it has implicitly created parser. In such cases, there one specific workflow path where some of the contents of most recently decoded token are needed, see:

FasterXML/jackson-databind#2635

Because of this, upon close, it would make sense NOT to clear _resultString.
(in theory, we might want full contents, but that could have issues with prevent recycling of buffers and so on -- for immediate problem, we know that _resultString has been aggregated and nothing more is needed).

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