jkotchoff wrote:
I am told that I should be using SuppressWarnings
ie.
Code:
@SuppressWarnings(value={"unchecked"}) // although this isn't currently implemented, in the future it will supress
public List<foo> getObjects() {
...
However, I dont think this annotation is properly supported yet in my development environment (eclipse/1.5 as specified in earlier post) and I am still getting the warning.
Ah yes, that is the solution I have been looking for. Excellent!
Indeed, doesn't seem to be supported/implemented yet properly, but should work in sunsequent releases. I can wait.
To conclude, when the source is trustworthy I will typecast and supress the warnings:
Code:
@SuppressWarnings(value={"unchecked"})
public synchronized List<AALanguage> getAllBeans(final int hints)
....
List<AALanguage> res = (List<AALanguage>) qry.list();
Otherwise if I don't trust the collection source I will use the function above to convert safely.
Unless I am missing something, the checked collections serve a slightly different purpose.
Thanks for the info :)