Skip to content

CompositeJsonEncoder throws NullPointerException when not started #474

@brenuart

Description

@brenuart

CompositeJsonEncoder throws a NullPointerException if not started when encode() is called. The null pointer is caused by lineSeparatorBytes being null at line 116.

This unsafe behaviour is particularly annoying when the encoder is used with an OutputStreamAppender like the console or file appenders: the appender turns itself off whenever an exception is thrown when processing a log event (should the exception be thrown by the encoder or the output stream).

Note that this issue is already fixed thanks to PR #472 (see line #74 in CompositeJsonEncoder.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions