Code example for Errors

Methods: getFieldType

0
		return (value instanceof String ? HtmlUtils.htmlEscape((String) value) : value);
	} 
 
	@Override 
	public Class<?> getFieldType(String field) {
		return this.source.getFieldType(field);
	} 
 
	@SuppressWarnings("unchecked") 
	private <T extends ObjectError> T escapeObjectError(T source) {
		if (source == null) {
			return null; 
		} 
		if (source instanceof FieldError) {
			FieldError fieldError = (FieldError) source;
			Object value = fieldError.getRejectedValue();
			if (value instanceof String) {
				value = HtmlUtils.htmlEscape((String) value);
			} 
			return (T) new FieldError(