Skip to content

Binder.validate() no longer fails with "bean level validators have been configured but no bean is currently set" when in buffered mode - #18121

Merged
tepi merged 9 commits into
mainfrom
fix/18120
Aug 18, 2025
Merged

tepi merged 9 commits into
mainfrom
fix/18120

Conversation

@mvysny

@mvysny mvysny commented Nov 24, 2023

Copy link
Copy Markdown
Member

Description

This PR makes the Binder.validate() implementation in line with its javadoc. Namely, Binder.validate() no longer fails with "bean level validators have been configured but no bean is currently set" when in buffered mode, which is according to the current javadoc: "Bean level validators are ignored if there is no bound bean or if any field level validator fails."

Fixes #18120

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

Additional for Feature type of change

  • Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

@github-actions

github-actions Bot commented Nov 24, 2023 •

Copy link
Copy Markdown
Contributor

Test Results

1 240 files  ± 0  1 240 suites  ±0   1h 13m 14s ⏱️ - 3m 17s
8 564 tests ± 0  8 497 ✅ ± 0  67 💤 ±0  0 ❌ ±0 
8 867 runs   - 18  8 793 ✅  - 18  74 💤 ±0  0 ❌ ±0 

Results for commit ff617a8. ± Comparison against base commit 4ec0547.

This pull request removes 3 and adds 3 tests. Note that renamed tests count towards both.
com.vaadin.flow.data.binder.BinderTest ‑ beanvalidation_isValid_throws_with_readBean
com.vaadin.flow.data.binder.BinderTest ‑ beanvalidation_validate_throws_with_readBean
com.vaadin.flow.data.binder.BinderTest ‑ isValidTest_unbound_binder_throws_with_bean_level_validation
com.vaadin.flow.data.binder.BinderTest ‑ beanvalidation_isValid_passes_with_readBean
com.vaadin.flow.data.binder.BinderTest ‑ beanvalidation_validate_passes_with_readBean
com.vaadin.flow.data.binder.BinderTest ‑ isValidTest_unbound_binder_passes_with_bean_level_validation

♻️ This comment has been updated with latest results.

@mvysny
mvysny requested a review from mshabarov November 29, 2023 06:23
@mcollovati mcollovati added the Contribution PRs coming from the community or external to the team label Nov 29, 2023
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@mshabarov

Copy link
Copy Markdown
Contributor

This should be postponed until major release of Flow (25), as this is a behaviour change.

@mshabarov mshabarov closed this Dec 15, 2023
@tepi tepi reopened this Jan 29, 2024
@tepi
tepi marked this pull request as draft January 29, 2024 12:58
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@vaadin-bot vaadin-bot added +0.1.0 and removed +1.0.0 labels Apr 17, 2025
@sonarqubecloud

Copy link
Copy Markdown

@tepi tepi self-assigned this Aug 18, 2025
@sonarqubecloud

Copy link
Copy Markdown

@tepi
tepi marked this pull request as ready for review August 18, 2025 09:06
@tepi
tepi enabled auto-merge (squash) August 18, 2025 09:11
@tepi
tepi merged commit b6709bc into main Aug 18, 2025
@tepi
tepi deleted the fix/18120 branch August 18, 2025 10:36
Copilot AI pushed a commit that referenced this pull request Oct 1, 2025
…en configured but no bean is currently set" when in buffered mode (#18121)

* fix: Binder.validate() no longer fails in buffered mode when bean-level validations are defined. 

Fixes #18120

---------

Co-authored-by: Peter Czuczor <61667986+czp13@users.noreply.github.com>
Co-authored-by: Teppo Kurki <teppo.kurki@vaadin.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Contribution PRs coming from the community or external to the team planned-in-25.0 +0.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Binder.validate() fails with "bean level validators have been configured but no bean is currently set" when in buffered mode

6 participants