@Test(expected = SuperCsvCellProcessorException.class) public void testWithNull() { processor.execute(null, ANONYMOUS_CSVCONTEXT); }
public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); final boolean matches = regexPattern.matcher((String) value).matches(); if( !matches ) { final String msg = REGEX_MSGS.get(regex); if( msg == null ) { throw new SuperCsvConstraintViolationException(String.format( "'%s' does not match the regular expression '%s'", value, regex), context, this); } else { throw new SuperCsvConstraintViolationException( String.format("'%s' does not match the constraint '%s' defined by the regular expression '%s'", value, msg, regex), context, this); } } return next.execute(value, context); }
StrRegEx extends CellProcessorAdaptor implements StringCellProcessor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); final boolean matches = regexPattern.matcher((String) value).matches(); if( !matches ) { final String msg = REGEX_MSGS.get(regex); if( msg == null ) { throw new SuperCsvConstraintViolationException(String.format( "'%s' does not match the regular expression '%s'", value, regex), context, this); } else { throw new SuperCsvConstraintViolationException( String.format("'%s' does not match the constraint '%s' defined by the regular expression '%s'", value, msg, regex), context, this); } } return next.execute(value, context); } }
StrRegEx extends CellProcessorAdaptor implements StringCellProcessor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); final boolean matches = regexPattern.matcher((String) value).matches(); if( !matches ) { final String msg = REGEX_MSGS.get(regex); if( msg == null ) { throw new SuperCsvConstraintViolationException(String.format( "'%s' does not match the regular expression '%s'", value, regex), context, this); } else { throw new SuperCsvConstraintViolationException( String.format("'%s' does not match the constraint '%s' defined by the regular expression '%s'", value, msg, regex), context, this); } } return next.execute(value, context); } StrRegEx(final String regex);  StrRegEx(final String regex, final StringCellProcessor next); }
StrRegEx extends CellProcessorAdaptor implements StringCellProcessor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); final boolean matches = regexPattern.matcher((String) value).matches(); if( !matches ) { final String msg = REGEX_MSGS.get(regex); if( msg == null ) { throw new SuperCsvConstraintViolationException(String.format( "'%s' does not match the regular expression '%s'", value, regex), context, this); } else { throw new SuperCsvConstraintViolationException( String.format("'%s' does not match the constraint '%s' defined by the regular expression '%s'", value, msg, regex), context, this); } } return next.execute(value, context); } StrRegEx(final String regex);  StrRegEx(final String regex, final StringCellProcessor next); Object execute(final Object value, final CsvContext context); static void registerMessage(String regex, String message); }
StrRegEx extends CellProcessorAdaptor implements StringCellProcessor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); final boolean matches = regexPattern.matcher((String) value).matches(); if( !matches ) { final String msg = REGEX_MSGS.get(regex); if( msg == null ) { throw new SuperCsvConstraintViolationException(String.format( "'%s' does not match the regular expression '%s'", value, regex), context, this); } else { throw new SuperCsvConstraintViolationException( String.format("'%s' does not match the constraint '%s' defined by the regular expression '%s'", value, msg, regex), context, this); } } return next.execute(value, context); } StrRegEx(final String regex);  StrRegEx(final String regex, final StringCellProcessor next); Object execute(final Object value, final CsvContext context); static void registerMessage(String regex, String message);  }