@Test public void testOnSkipInProcessUnknownType() throws Exception { listener.onSkipInProcess(new Object(), new Exception("error") ); Assert.assertTrue(appender.getEvents() .stream() .anyMatch(logEvent -> logEvent .getMessage() .getFormattedMessage() .contains("error") )); }
@Override public void onSkipInProcess(Object item, Throwable t) { if (item instanceof LineStop) { PROCESS.info(t.getMessage(), (LineStop) item); } else if (item instanceof ExcelRow) { PROCESS.info(t.getMessage(), (ExcelRow) item); } else { PROCESS.info("unknown_type", (ExcelRow) null); PROCESS.debug(t.getMessage(), (ExcelRow) null); } }
LogSkippedItemListener implements SkipListener<Object, BatchExcelRow>, ItemProcessListener<Object, Object> { @Override public void onSkipInProcess(Object item, Throwable t) { if (item instanceof LineStop) { PROCESS.info(t.getMessage(), (LineStop) item); } else if (item instanceof ExcelRow) { PROCESS.info(t.getMessage(), (ExcelRow) item); } else { PROCESS.info("unknown_type", (ExcelRow) null); PROCESS.debug(t.getMessage(), (ExcelRow) null); } } }
LogSkippedItemListener implements SkipListener<Object, BatchExcelRow>, ItemProcessListener<Object, Object> { @Override public void onSkipInProcess(Object item, Throwable t) { if (item instanceof LineStop) { PROCESS.info(t.getMessage(), (LineStop) item); } else if (item instanceof ExcelRow) { PROCESS.info(t.getMessage(), (ExcelRow) item); } else { PROCESS.info("unknown_type", (ExcelRow) null); PROCESS.debug(t.getMessage(), (ExcelRow) null); } }  }
LogSkippedItemListener implements SkipListener<Object, BatchExcelRow>, ItemProcessListener<Object, Object> { @Override public void onSkipInProcess(Object item, Throwable t) { if (item instanceof LineStop) { PROCESS.info(t.getMessage(), (LineStop) item); } else if (item instanceof ExcelRow) { PROCESS.info(t.getMessage(), (ExcelRow) item); } else { PROCESS.info("unknown_type", (ExcelRow) null); PROCESS.debug(t.getMessage(), (ExcelRow) null); } }  @Override void onSkipInRead(Throwable t); @Override void onSkipInWrite(BatchExcelRow item, Throwable t); @Override void onSkipInProcess(Object item, Throwable t); @Override void beforeProcess(Object item); @Override void afterProcess(Object item, Object result); @Override void onProcessError(Object item, Exception e); }
LogSkippedItemListener implements SkipListener<Object, BatchExcelRow>, ItemProcessListener<Object, Object> { @Override public void onSkipInProcess(Object item, Throwable t) { if (item instanceof LineStop) { PROCESS.info(t.getMessage(), (LineStop) item); } else if (item instanceof ExcelRow) { PROCESS.info(t.getMessage(), (ExcelRow) item); } else { PROCESS.info("unknown_type", (ExcelRow) null); PROCESS.debug(t.getMessage(), (ExcelRow) null); } }  @Override void onSkipInRead(Throwable t); @Override void onSkipInWrite(BatchExcelRow item, Throwable t); @Override void onSkipInProcess(Object item, Throwable t); @Override void beforeProcess(Object item); @Override void afterProcess(Object item, Object result); @Override void onProcessError(Object item, Exception e);  }