Skip to content

Commit

Permalink
Potential NPE in SurefireTestLayout.doLayout(ILoggingEvent), re #13
Browse files Browse the repository at this point in the history
  • Loading branch information
safris committed Oct 2, 2023
1 parent 135377a commit 79eb779
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/libj/test/SurefireTestLayout.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class SurefireTestLayout extends LayoutBase<ILoggingEvent> {
@Override
public String doLayout(final ILoggingEvent event) {
final String message = event.getFormattedMessage();
final StringBuilder builder = new StringBuilder(TestAide.isInSurefireTest() ? TEST + (message.contains("\n") ? message.replace("\n", "\n" + TEST) : message) : event.getFormattedMessage());
final StringBuilder builder = new StringBuilder(TestAide.isInSurefireTest() ? TEST + (message.contains("\n") ? message.replace("\n", "\n" + TEST) : message != null ? message : "") : event.getFormattedMessage());
builder.append(CoreConstants.LINE_SEPARATOR);
if (event.getThrowableProxy() != null) {
builder.append(converter.convert(event));
Expand Down

0 comments on commit 79eb779

Please sign in to comment.