Skip to content

Commit

Permalink
Added missing constructor with scanNestedDefinitions option (#7099)
Browse files Browse the repository at this point in the history
Cherry pick from: vaadin/framework#11801
  • Loading branch information
TatuLund authored and Denis committed Dec 12, 2019
1 parent 7a24480 commit 9f70b3b
Showing 1 changed file with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,25 @@ public class BeanValidationBinder<BEAN> extends Binder<BEAN> {
* the bean type to use, not <code>null</code>
*/
public BeanValidationBinder(Class<BEAN> beanType) {
super(beanType);
this(beanType,false);
}

/**
* Creates a new binder that uses reflection based on the provided bean type
* to resolve bean properties. It assumes that JSR-303 bean validation
* implementation is present on the classpath. If there is no such
* implementation available then {@link Binder} class should be used instead
* (this constructor will throw an exception). Otherwise
* {@link BeanValidator} is added to each binding that is defined using a
* property name.
*
* @param beanType
* the bean type to use, not {@code null}
* @param scanNestedDefinitions
* if {@code true}, scan for nested property definitions as well
*/
public BeanValidationBinder(Class<BEAN> beanType, boolean scanNestedDefinitions) {
super(beanType, scanNestedDefinitions);
if (!BeanUtil.checkBeanValidationAvailable()) {
throw new IllegalStateException(
BeanValidationBinder.class.getSimpleName()
Expand Down

0 comments on commit 9f70b3b

Please sign in to comment.