Skip to content

fix: Use String type for Style.bind return value (#23888) (CP: 25.1)#23889

Merged
mshabarov merged 1 commit into25.1from
cherry-pick-23888-to-25.1-1773658635924
Mar 16, 2026
Merged

fix: Use String type for Style.bind return value (#23888) (CP: 25.1)#23889
mshabarov merged 1 commit into25.1from
cherry-pick-23888-to-25.1-1773658635924

Conversation

@vaadin-bot
Copy link
Collaborator

This PR cherry-picks changes from the original PR #23888 to branch 25.1.

Original PR description

Change Style.bind(String, Signal) return type from SignalBinding<?> to SignalBinding since the method always accepts a Signal and we always know the value type is String.

This provides better type safety and eliminates the need for casts when using the binding's onChange callbacks.

Changes:

  • Style.bind: return SignalBinding instead of SignalBinding<?>
  • BasicElementStyle.bind: update implementation
  • ImmutableEmptyStyle.bind: update implementation
  • AbstractPropertyMap.bindSignal: make generic with type parameter
  • StyleBindTest: update tests to use typed BindingContext
  • StyleBindTest: add test to verify typed return value

🤖 Generated with Claude Code

Change `Style.bind(String, Signal<String>)` return type from
`SignalBinding<?>` to `SignalBinding<String>` since the method
always accepts a `Signal<String>` and we always know the value
type is String.

This provides better type safety and eliminates the need for
casts when using the binding's `onChange` callbacks.
@sonarqubecloud
Copy link

@github-actions
Copy link

Test Results

 1 384 files  ±0   1 384 suites  ±0   1h 26m 44s ⏱️ + 1m 30s
 9 909 tests +1   9 838 ✅ +1  71 💤 ±0  0 ❌ ±0 
10 382 runs  +1  10 302 ✅ +1  80 💤 ±0  0 ❌ ±0 

Results for commit 871103b. ± Comparison against base commit 223054a.

@mshabarov mshabarov merged commit 8ede1c7 into 25.1 Mar 16, 2026
30 checks passed
@mshabarov mshabarov deleted the cherry-pick-23888-to-25.1-1773658635924 branch March 16, 2026 12:11
@vaadin-bot
Copy link
Collaborator Author

This ticket/PR has been released with Vaadin 25.1.0-rc2.

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