Skip to content

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

Merged
caalador merged 1 commit into9.5from
cherry/cherrypick-2162-to-9.5
Mar 6, 2026
Merged

fix: ensure overridden notUsableReasons is called by ensureComponentIsUsable (#2162) (CP: 9.5)#2163
caalador merged 1 commit into9.5from
cherry/cherrypick-2162-to-9.5

Conversation

@mcollovati
Copy link
Contributor

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)

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.
@caalador caalador merged commit a22255f into 9.5 Mar 6, 2026
4 checks passed
@caalador caalador deleted the cherry/cherrypick-2162-to-9.5 branch March 6, 2026 08:47
vaadin-bot pushed a commit that referenced this pull request Mar 6, 2026
…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 pushed a commit that referenced this pull request Mar 9, 2026
…ntIsUsable` (#2162) (#2163) (#2165)

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.

Co-authored-by: Marco Collovati <marco@vaadin.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants