vaadin / vaadin/framework

Deprecate MultiSelectionEvent.getNewSelection

Open
#11,756 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Help wanted Stale
Dominant language
Java
Stars
1.8k
Forks
717
Avg merge
2d 6h
Merged PRs (30d)
3

Description

Description copied from https://github.com/vaadin/flow/issues/6756

The class has three methods for the same thing:

Set<T> getValue()
Set<T> getAllSelectedItems()
Set<T> getNewSelection()

The first two are inherited, but getNewSelection exists only in MultiSelectionEvent.

Another reason to deprecate it is that the naming can cause confusion. We got feedback that a user expected the method to return the newly added items (compared to the old selection), i.e. what getAddedSelection returns.

JavaDocs should suggest to use getAllSelectedItems or getValue instead.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating MultiSelectionEvent and its getNewSelection method in the Java sources. Review the inherited getValue and getAllSelectedItems API, then update the method's JavaDocs to recommend those alternatives; done when the method is deprecated and its documentation explains the replacement.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.