@Test public void PropertyEditingExceptionの場合にフィールドエラーが設定される() { class T { } MethodInvocationException mie = new MethodInvocationException(new PropertyChangeEvent(new T(), "aaaa", null, null), new PropertyEditingException("message")); BeanPropertyBindingResult result = new BeanPropertyBindingResult(new T(), "Test"); processor.processPropertyAccessException(mie, result); assertThat(result.getFieldError(), notNullValue()); }
@Override public void processPropertyAccessException(PropertyAccessException e, BindingResult bindingResult) { TypeOrFormatMismatchException converted = null; if (Controllers.exceptionMatch(e.getCause().getClass(), PropertyEditingException.class)) { converted = new TypeOrFormatMismatchException(e, bindingResult); super.processPropertyAccessException(converted, bindingResult); } else { super.processPropertyAccessException(e, bindingResult); } }
JseBindingErrorProcessor extends DefaultBindingErrorProcessor implements InitializingBean { @Override public void processPropertyAccessException(PropertyAccessException e, BindingResult bindingResult) { TypeOrFormatMismatchException converted = null; if (Controllers.exceptionMatch(e.getCause().getClass(), PropertyEditingException.class)) { converted = new TypeOrFormatMismatchException(e, bindingResult); super.processPropertyAccessException(converted, bindingResult); } else { super.processPropertyAccessException(e, bindingResult); } } }
JseBindingErrorProcessor extends DefaultBindingErrorProcessor implements InitializingBean { @Override public void processPropertyAccessException(PropertyAccessException e, BindingResult bindingResult) { TypeOrFormatMismatchException converted = null; if (Controllers.exceptionMatch(e.getCause().getClass(), PropertyEditingException.class)) { converted = new TypeOrFormatMismatchException(e, bindingResult); super.processPropertyAccessException(converted, bindingResult); } else { super.processPropertyAccessException(e, bindingResult); } } JseBindingErrorProcessor(); }
JseBindingErrorProcessor extends DefaultBindingErrorProcessor implements InitializingBean { @Override public void processPropertyAccessException(PropertyAccessException e, BindingResult bindingResult) { TypeOrFormatMismatchException converted = null; if (Controllers.exceptionMatch(e.getCause().getClass(), PropertyEditingException.class)) { converted = new TypeOrFormatMismatchException(e, bindingResult); super.processPropertyAccessException(converted, bindingResult); } else { super.processPropertyAccessException(e, bindingResult); } } JseBindingErrorProcessor(); final void setJseLocalValidatorFactoryBean(JseLocalValidatorFactoryBean factoryBean); @Override void processPropertyAccessException(PropertyAccessException e, BindingResult bindingResult); @Override void afterPropertiesSet(); }
JseBindingErrorProcessor extends DefaultBindingErrorProcessor implements InitializingBean { @Override public void processPropertyAccessException(PropertyAccessException e, BindingResult bindingResult) { TypeOrFormatMismatchException converted = null; if (Controllers.exceptionMatch(e.getCause().getClass(), PropertyEditingException.class)) { converted = new TypeOrFormatMismatchException(e, bindingResult); super.processPropertyAccessException(converted, bindingResult); } else { super.processPropertyAccessException(e, bindingResult); } } JseBindingErrorProcessor(); final void setJseLocalValidatorFactoryBean(JseLocalValidatorFactoryBean factoryBean); @Override void processPropertyAccessException(PropertyAccessException e, BindingResult bindingResult); @Override void afterPropertiesSet();  }