/** * {@inheritDoc} * * @throws SuperCsvCellProcessorException * if value is null * @throws SuperCsvConstraintViolationException * if value is in the forbidden list */ public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); final String stringValue = value.toString(); for( String forbidden : forbiddenSubStrings ) { if( stringValue.contains(forbidden) ) { throw new SuperCsvConstraintViolationException(String.format( "'%s' contains the forbidden substring '%s'", value, forbidden), context, this); } } return next.execute(value, context); } }