Skip to content

fix: ensure overridden notUsableReasons is called by ensureComponentIsUsable (#2162) (CP: 9.5) (#2163) (CP: 9.6)#2165

Merged
mshabarov merged 1 commit into9.6from
cherry-pick-2163-to-9.6-1772790095671
Mar 9, 2026
Merged

fix: ensure overridden notUsableReasons is called by ensureComponentIsUsable (#2162) (CP: 9.5) (#2163) (CP: 9.6)#2165
mshabarov merged 1 commit into9.6from
cherry-pick-2163-to-9.6-1772790095671

Conversation

@vaadin-bot
Copy link
Collaborator

This PR cherry-picks changes from the original PR #2163 to branch 9.6.

Original PR description

When a ComponentTester subclass overrides notUsableReasons, the override was never invoked when building error messages, causing subclass-specific reasons (e.g. "read only", "not opened") to be missing from the exception.

Fixed by routing the instance method through virtual dispatch so that subclass overrides are properly picked up.

…ntIsUsable` (#2162) (#2163)

When a `ComponentTester` subclass overrides `notUsableReasons`, the
override was never invoked when building error messages, causing
subclass-specific reasons (e.g. "read only", "not opened") to be
missing from the exception.

Fixed by routing the instance method through virtual dispatch so that
subclass overrides are properly picked up.
@mshabarov mshabarov merged commit a000e88 into 9.6 Mar 9, 2026
4 checks passed
@mshabarov mshabarov deleted the cherry-pick-2163-to-9.6-1772790095671 branch March 9, 2026 12:57
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 this pull request may close these issues.

3 participants