/** * Whether to raise a fatal bind exception on validation errors. * <p>The default implementation delegates to {@link #isBindExceptionRequired(MethodParameter)}. * @param binder the data binder used to perform data binding * @param parameter the method parameter declaration * @return {@code true} if the next method parameter is not of type {@link Errors} * @see #isBindExceptionRequired(MethodParameter) */ protected boolean isBindExceptionRequired(WebDataBinder binder, MethodParameter parameter) { return isBindExceptionRequired(parameter); }
/** * Whether to raise a fatal bind exception on validation errors. * <p>The default implementation delegates to {@link #isBindExceptionRequired(MethodParameter)}. * @param binder the data binder used to perform data binding * @param parameter the method parameter declaration * @return {@code true} if the next method parameter is not of type {@link Errors} * @see #isBindExceptionRequired(MethodParameter) */ protected boolean isBindExceptionRequired(WebDataBinder binder, MethodParameter parameter) { return isBindExceptionRequired(parameter); }
@Test public void bindExceptionRequired() throws Exception { assertTrue(this.processor.isBindExceptionRequired(null, this.paramNonSimpleType)); assertFalse(this.processor.isBindExceptionRequired(null, this.paramNamedValidModelAttr)); }
if (isBindExceptionRequired(parameter)) { if (binder.getBindingResult().hasErrors() && isBindExceptionRequired(binder, parameter)) { throw new BindException(binder.getBindingResult());
if (isBindExceptionRequired(parameter)) { if (binder.getBindingResult().hasErrors() && isBindExceptionRequired(binder, parameter)) { throw new BindException(binder.getBindingResult());
/** * Whether to raise a fatal bind exception on validation errors. * <p>The default implementation delegates to {@link #isBindExceptionRequired(MethodParameter)}. * @param binder the data binder used to perform data binding * @param parameter the method parameter declaration * @return {@code true} if the next method parameter is not of type {@link Errors} * @see #isBindExceptionRequired(MethodParameter) */ protected boolean isBindExceptionRequired(WebDataBinder binder, MethodParameter parameter) { return isBindExceptionRequired(parameter); }
if (isBindExceptionRequired(parameter)) { if (binder.getBindingResult().hasErrors() && isBindExceptionRequired(binder, parameter)) { throw new BindException(binder.getBindingResult());
if (isBindExceptionRequired(parameter)) { if (binder.getBindingResult().hasErrors() && isBindExceptionRequired(binder, parameter)) { throw new BindException(binder.getBindingResult());