/** * If {@link #out} implements {@link java.io.Closeable}, or is a {@link Appender} wrapper * around a closeable object, delegates to that object. Otherwise just flush (if possible). */ @Override @SuppressWarnings("SynchronizeOnNonFinalField") public void close() throws IOException { synchronized (lock) { IO.close(out); } }
/** * If {@link #out} implements {@link java.io.Closeable}, or is a {@link Appender} wrapper * around a closeable object, delegates to that object. Otherwise just flush (if possible). */ @Override @SuppressWarnings("SynchronizeOnNonFinalField") public void close() throws IOException { synchronized (lock) { IO.close(out); } }