Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CompositeJsonEncoder throws NullPointerException when not started #474

Closed
brenuart opened this issue Jan 8, 2021 · 0 comments
Closed

CompositeJsonEncoder throws NullPointerException when not started #474

brenuart opened this issue Jan 8, 2021 · 0 comments
Labels
Milestone

Comments

@brenuart
Copy link
Collaborator

brenuart commented Jan 8, 2021

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.)

@philsttr philsttr added this to the 7.0 milestone Jan 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants