This does not compile, any suggestion appreciated.
... List list = getList(); return (List) list;
Compil
You should just iterate over the list and cast all Objects one by one