@Override
	public Date convert(String source) {
		try {
			return dateFormat.parse(source);
		}
		catch (ParseException e) {
			String pattern;
			if (dateFormat instanceof SimpleDateFormat) {
				pattern = ((SimpleDateFormat) dateFormat).toPattern();
			}
			else {
				pattern = dateFormat.toString();
			}
			throw new IllegalArgumentException(e.getMessage() + ", format: [" + pattern + "]");
		}
	}
Converter for Strings to Date that can take into account date patterns

@author Mark Pollack
spring-xd-tuple/src/main/java/org/springframework/xd/tuple/StringToDateConverter.java