@Test public void invalidCharset() throws IOException { String file = FileSystem.createTemporaryFile(); new SharedFileWriter(doubletonMap("file", file, "charset", "UTF-42")).close(); assertThat(systemStream.consumeErrorOutput()).containsOnlyOnce("ERROR").containsOnlyOnce("charset").containsOnlyOnce("UTF-42"); }
@Override public void close() throws IOException { try { writer.close(); } finally { if (lockFile != null) { try { lock.release(); } finally { lockFile.close(); } } } }
SharedFileWriter extends AbstractFormatPatternWriter { @Override public void close() throws IOException { try { writer.close(); } finally { if (lockFile != null) { try { lock.release(); } finally { lockFile.close(); } } } } }
SharedFileWriter extends AbstractFormatPatternWriter { @Override public void close() throws IOException { try { writer.close(); } finally { if (lockFile != null) { try { lock.release(); } finally { lockFile.close(); } } } } SharedFileWriter();  SharedFileWriter(final Map<String, String> properties); }
SharedFileWriter extends AbstractFormatPatternWriter { @Override public void close() throws IOException { try { writer.close(); } finally { if (lockFile != null) { try { lock.release(); } finally { lockFile.close(); } } } } SharedFileWriter();  SharedFileWriter(final Map<String, String> properties); @Override void write(final LogEntry logEntry); @Override void flush(); @Override void close(); }
SharedFileWriter extends AbstractFormatPatternWriter { @Override public void close() throws IOException { try { writer.close(); } finally { if (lockFile != null) { try { lock.release(); } finally { lockFile.close(); } } } } SharedFileWriter();  SharedFileWriter(final Map<String, String> properties); @Override void write(final LogEntry logEntry); @Override void flush(); @Override void close();  }