HasFilterableDataProvider#setDataProvider(DataProvider) is broken for ComboBox
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.8k
- Forks
- 717
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 3
Description
ComboBox implements the interface HasFilterableDataProvider and does not override the methode setDataProvider(DataProvider). (in fact ComboBox is the only implementation in core framework).
In "normal" code that has correct generic types, this method could not be used because of the incompatible type setup. But in more generic code (for example you do not know that it is a comboBox but a HasFilterableDataProvider) you could simply call the method.
When the method is used to setup the data provider, the filter is broken. When you enter something in the combo box a ClassCastException occures.
It is quite hard to notice that something is broken. Even our UI Tests would actually not test wether the filter of a combobox works. So I think it is necessary to throw a RuntimeException (for example IllegalArgumentException) when this method is called. Even better: make it deprecated because there seems to to be no useful way to use it in core framework.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading HasFilterableDataProvider and ComboBox, focusing on the setDataProvider(DataProvider) entry point and the filter path it reaches. Check the existing ComboBox UI tests, including whether generic-provider usage is covered. Done means the incompatible call has an intentional, documented outcome and entering a filter no longer produces the reported ClassCastException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100