[ https://issues.apache.org/jira/browse/PIVOT-770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sandro Martini updated PIVOT-770: --------------------------------- Affects Version/s: (was: 2.0.1) Fix Version/s: (was: 2.0.2) 2.1 > 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: Sandro Martini > Priority: Minor > Fix For: 2.1 > > 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 is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira