@Test(expected = NullPointerException.class) public void writeCommentWithNull() throws IOException { abstractWriter.writeComment(null); }
public void writeComment(final String comment) throws IOException { lineNumber++; if( comment == null ) { throw new NullPointerException(String.format("comment to write should not be null on line %d", lineNumber)); } writer.write(comment + preference.getEndOfLineSymbols()); }
AbstractCsvWriter implements ICsvWriter { public void writeComment(final String comment) throws IOException { lineNumber++; if( comment == null ) { throw new NullPointerException(String.format("comment to write should not be null on line %d", lineNumber)); } writer.write(comment + preference.getEndOfLineSymbols()); } }
AbstractCsvWriter implements ICsvWriter { public void writeComment(final String comment) throws IOException { lineNumber++; if( comment == null ) { throw new NullPointerException(String.format("comment to write should not be null on line %d", lineNumber)); } writer.write(comment + preference.getEndOfLineSymbols()); } AbstractCsvWriter(final Writer writer, final CsvPreference preference);  AbstractCsvWriter(final Writer writer, final CsvPreference preference, boolean bufferizeWriter); }
AbstractCsvWriter implements ICsvWriter { public void writeComment(final String comment) throws IOException { lineNumber++; if( comment == null ) { throw new NullPointerException(String.format("comment to write should not be null on line %d", lineNumber)); } writer.write(comment + preference.getEndOfLineSymbols()); } AbstractCsvWriter(final Writer writer, final CsvPreference preference);  AbstractCsvWriter(final Writer writer, final CsvPreference preference, boolean bufferizeWriter); void close(); void flush(); int getLineNumber(); int getRowNumber(); void writeComment(final String comment); void writeHeader(final String... header); }
AbstractCsvWriter implements ICsvWriter { public void writeComment(final String comment) throws IOException { lineNumber++; if( comment == null ) { throw new NullPointerException(String.format("comment to write should not be null on line %d", lineNumber)); } writer.write(comment + preference.getEndOfLineSymbols()); } AbstractCsvWriter(final Writer writer, final CsvPreference preference);  AbstractCsvWriter(final Writer writer, final CsvPreference preference, boolean bufferizeWriter); void close(); void flush(); int getLineNumber(); int getRowNumber(); void writeComment(final String comment); void writeHeader(final String... header);  }