@Test public void testNull() { ConsoleWriter<String> consoleWriter = new ConsoleWriter<>(); String foo = null; try { consoleWriter.write(foo); } catch (Exception e) { Assert.fail("Should not throw an exception on null"); } }
@Override public void write(D record) throws IOException { System.out.println(record); if (record != null) { log.info(record.toString()); } else { log.info("null record"); } ++_recordsWritten; }
ConsoleWriter implements WatermarkAwareWriter<D> { @Override public void write(D record) throws IOException { System.out.println(record); if (record != null) { log.info(record.toString()); } else { log.info("null record"); } ++_recordsWritten; } }
ConsoleWriter implements WatermarkAwareWriter<D> { @Override public void write(D record) throws IOException { System.out.println(record); if (record != null) { log.info(record.toString()); } else { log.info("null record"); } ++_recordsWritten; } ConsoleWriter(); }
ConsoleWriter implements WatermarkAwareWriter<D> { @Override public void write(D record) throws IOException { System.out.println(record); if (record != null) { log.info(record.toString()); } else { log.info("null record"); } ++_recordsWritten; } ConsoleWriter(); @Override void write(D record); @Override void commit(); @Override void cleanup(); @Override long recordsWritten(); @Override long bytesWritten(); @Override void close(); @Override void flush(); }
ConsoleWriter implements WatermarkAwareWriter<D> { @Override public void write(D record) throws IOException { System.out.println(record); if (record != null) { log.info(record.toString()); } else { log.info("null record"); } ++_recordsWritten; } ConsoleWriter(); @Override void write(D record); @Override void commit(); @Override void cleanup(); @Override long recordsWritten(); @Override long bytesWritten(); @Override void close(); @Override void flush();  }