Skip to content

refactor: deprecate DataCommunicatorBuilder and its constructors#9667

Merged
vursen merged 4 commits into
mainfrom
deprecate/grid-data-communicator-builder
Jul 6, 2026
Merged

refactor: deprecate DataCommunicatorBuilder and its constructors#9667
vursen merged 4 commits into
mainfrom
deprecate/grid-data-communicator-builder

Conversation

@vursen

@vursen vursen commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

This PR deprecates DataCommunicatorBuilder together with the constructors that accept it in Grid and TreeGrid, and introduces a createDataCommunicator() method to Grid as a new override point.

Existing constructors keep their current behavior unchanged: the deprecated builder-based constructors store the builder in a field, and createDataCommunicator() uses it, which preserves backward compatibility for anyone with a custom DataCommunicatorBuilder.

A new getCompositeDataGenerator() getter is added as well: it keeps the grid's composite data generator accessible for createDataCommunicator() overrides, since with DataCommunicatorBuilder deprecated, there would otherwise be no way to pass it into DataCommunicator.

Prepare for Vaadin 26, where DataCommunicatorBuilder will be replaced
by a createDataCommunicator() method (#9664). Add
createDataCommunicator() now so it's available as an override point
already, and deprecate DataCommunicatorBuilder and the constructors
that accept it.

Existing constructors keep their current behavior unchanged: the
builder-based constructors store the given builder and
createDataCommunicator() uses it, preserving backward compatibility
for anyone with a custom DataCommunicatorBuilder.

Related to #9664

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vursen vursen changed the title deprecate: DataCommunicatorBuilder and its constructors chore: deprecate DataCommunicatorBuilder and its constructors Jul 3, 2026
@vursen vursen changed the title chore: deprecate DataCommunicatorBuilder and its constructors refactor: deprecate DataCommunicatorBuilder and its constructors Jul 3, 2026
@vursen vursen force-pushed the deprecate/grid-data-communicator-builder branch from 884711d to e1b2883 Compare July 3, 2026 10:04
Add getCompositeDataGenerator() alongside the existing
getArrayUpdater(), and use it in createDataCommunicator() instead of
accessing the private field directly. Rename the backing field from
gridDataGenerator to compositeDataGenerator to match its type and the
new getter name.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vursen vursen force-pushed the deprecate/grid-data-communicator-builder branch from e1b2883 to da707e6 Compare July 3, 2026 10:06
@vursen vursen requested a review from DiegoCardoso July 6, 2026 08:23
Comment on lines +1737 to +1742
/**
* Creates the {@link DataCommunicator} that this Grid uses to handle all
* data communication.
*
* @return the new data communicator
*/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a @since 25.3 mention here and in the other method below?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, added.

@vursen

vursen commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Please re-format the code

Copilot AI commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@copilot Please re-format the code

Done in 5fd2a0a (style: apply spotless formatting). The only change was reflowing a Javadoc line in getCompositeDataGenerator().

Copilot finished work on behalf of vursen July 6, 2026 13:50
@vaadin vaadin deleted a comment from github-actions Bot Jul 6, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jul 6, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@vursen vursen added this pull request to the merge queue Jul 6, 2026
Merged via the queue into main with commit 7745c4a Jul 6, 2026
20 of 21 checks passed
@vursen vursen deleted the deprecate/grid-data-communicator-builder branch July 6, 2026 14:11
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