-
Type:
Improvement
-
Status: Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 2.0
-
Fix Version/s: 2.5
-
Component/s: None
-
Labels:None
Firstly, please forgive me if I use incorrect terms, I'm no generics expert
I'll use TableView#getTableData() as an example. This method is today anonymously typed, so that if you want to mutate the list, you need to cast it to a spesific type first. This can easily be fixed by parameterizing the method. The same goes for ListView and TreeView as well. I'll supply a patch to change this behavior. This removes an annoyance and enables better looking code.
This is how one need to do it today:
List<MyObject> myList = (List<MyObject>) tableView.getTableData();
myList.add(myObject);
By parameterizing the methods, this changes to:
tableView.getTableData().add(myObject);