Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace logic related to hibernate NotEmpty with new javax.validation.constraints.NotEmpty #2261

Closed
denis-anisimov opened this issue Aug 29, 2017 · 2 comments · Fixed by #4139
Assignees
Milestone

Comments

@denis-anisimov
Copy link
Contributor

Binder uses some logic which relies on NotEmpty annotation from hibernate.

New validation API contains new annotation javax.validation.constraints.NotEmpty which should be used instead or along with the old hibernate annotation.

Update unit tests.

@pleku
Copy link
Contributor

pleku commented Sep 23, 2017

Currently <artifactId>hibernate-validator</artifactId> is only a test scope dependency for flow-data. I see no usage of it in Binderor BeanValidationBinder.

So is this issue a) totally unnecessary b) about just updating unit tests ? @denis-anisimov

@denis-anisimov
Copy link
Contributor Author

See com.vaadin.data.RequiredFieldConfigurator. We use FQN to compare the class name.
So we don't need to depend on hibernate. If it's in the classpath then the annotation might be used and it will be checked. If it's not in the classpath then annotation simply can't be used.
Our code works regardless of hibernate presence.

But this annotation is now available in new validation API. It should be used instead/in addition to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants