[ https://issues.apache.org/jira/browse/PIVOT-770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roger Whitcomb reassigned PIVOT-770: ------------------------------------ Assignee: Roger Whitcomb (was: Sandro Martini) > Parameterize ListView, TableView and TreeView getters and setters for ListData > ------------------------------------------------------------------------------ > > Key: PIVOT-770 > URL: https://issues.apache.org/jira/browse/PIVOT-770 > Project: Pivot > Issue Type: Improvement > Affects Versions: 2.0 > Reporter: Edvin Syse > Assignee: Roger Whitcomb > Priority: Minor > Fix For: 2.5 > > Attachments: Parameterize-GetAndSetListData.patch > > > 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); -- This message was sent by Atlassian JIRA (v6.4.14#64029)