Skip to content

fix: ensure overridden notUsableReasons is called by ensureComponentIsUsable#2162

Merged
mcollovati merged 1 commit intomainfrom
fix/overridde_notUsableReasons_not_called
Mar 6, 2026
Merged

fix: ensure overridden notUsableReasons is called by ensureComponentIsUsable#2162
mcollovati merged 1 commit intomainfrom
fix/overridde_notUsableReasons_not_called

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`

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.
@mcollovati mcollovati requested a review from caalador March 6, 2026 06:42
@mcollovati mcollovati enabled auto-merge (squash) March 6, 2026 06:52
@mcollovati mcollovati merged commit 361a8c2 into main Mar 6, 2026
10 checks passed
@mcollovati mcollovati deleted the fix/overridde_notUsableReasons_not_called branch March 6, 2026 07:09
mcollovati added a commit that referenced this pull request Mar 6, 2026
…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 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.
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants