@Test public void shouldSkip() { Assert.assertTrue(skipPolicy.shouldSkip( new FlatFileParseException("", ""), whateverSkipCount) ); Assert.assertTrue(skipPolicy.shouldSkip( new ParseException(""), whateverSkipCount) ); Assert.assertFalse(skipPolicy.shouldSkip( new ItemReaderException("") {}, whateverSkipCount) ); }
@Override public boolean shouldSkip(Throwable t, int skipCount) throws SkipLimitExceededException { return exceptionClassToSkip.isAssignableFrom(t.getClass()); }
ExceptionSkipPolicy implements SkipPolicy { @Override public boolean shouldSkip(Throwable t, int skipCount) throws SkipLimitExceededException { return exceptionClassToSkip.isAssignableFrom(t.getClass()); } }
ExceptionSkipPolicy implements SkipPolicy { @Override public boolean shouldSkip(Throwable t, int skipCount) throws SkipLimitExceededException { return exceptionClassToSkip.isAssignableFrom(t.getClass()); } ExceptionSkipPolicy(Class<? extends Exception> exceptionClassToSkip); }
ExceptionSkipPolicy implements SkipPolicy { @Override public boolean shouldSkip(Throwable t, int skipCount) throws SkipLimitExceededException { return exceptionClassToSkip.isAssignableFrom(t.getClass()); } ExceptionSkipPolicy(Class<? extends Exception> exceptionClassToSkip); @Override boolean shouldSkip(Throwable t, int skipCount); }
ExceptionSkipPolicy implements SkipPolicy { @Override public boolean shouldSkip(Throwable t, int skipCount) throws SkipLimitExceededException { return exceptionClassToSkip.isAssignableFrom(t.getClass()); } ExceptionSkipPolicy(Class<? extends Exception> exceptionClassToSkip); @Override boolean shouldSkip(Throwable t, int skipCount);  }