@Test void testShouldNotAttemptCloseOnNullPrintStream() { LogEventWriter writer = new TestLogEventWriter(); writer.setPrintStream(null); assertDoesNotThrow(writer::close); }
@Override public void setPrintStream(PrintStream p) { if (p == null) { close(); return; } if (this.p == p) return; if (this.p != null) close(); this.p = p; }
BaseLogEventWriter implements LogEventWriter { @Override public void setPrintStream(PrintStream p) { if (p == null) { close(); return; } if (this.p == p) return; if (this.p != null) close(); this.p = p; } }
BaseLogEventWriter implements LogEventWriter { @Override public void setPrintStream(PrintStream p) { if (p == null) { close(); return; } if (this.p == p) return; if (this.p != null) close(); this.p = p; }  }
BaseLogEventWriter implements LogEventWriter { @Override public void setPrintStream(PrintStream p) { if (p == null) { close(); return; } if (this.p == p) return; if (this.p != null) close(); this.p = p; }  @Override void setPrintStream(PrintStream p); @Override synchronized void close(); @Override void write(LogEvent ev); }
BaseLogEventWriter implements LogEventWriter { @Override public void setPrintStream(PrintStream p) { if (p == null) { close(); return; } if (this.p == p) return; if (this.p != null) close(); this.p = p; }  @Override void setPrintStream(PrintStream p); @Override synchronized void close(); @Override void write(LogEvent ev);  }