"Type Safety" Warnings in Problems View [message #59661] |
Fri, 29 April 2005 17:32 |
Eclipse User |
|
|
|
Originally posted by: marc.esher.cablespeed.com
Greetings. In the "Problems" view, Eclipse keeps flagging HashMaps and
ArrayLists for type safety. Take the following code (BeanListHandler and
runner.query are from apache DBUtils):
1. ResultSetHandler h = new BeanListHandler(FileBean.class);
2. ArrayList <FileBean> ar_FileBeans;
3. ar_FileBeans = (ArrayList)runner.query(cn,qry_FilesOnServers,h);
Eclipse is flagging line 3 with the message "Type Safety: The Expression
of raw type ArrayList is converted to ArrayList<FileBean>. References to
generic type ArrayList<E> should be parameterized".
I'm just starting to tinker with generics.
So...how should i revise this code such that Eclipse is happy?
Thanks for input.
|
|
|
|
Powered by
FUDForum. Page generated in 0.08553 seconds