This content has been marked as final. Show 2 replies
Those warnings have no effect on the execution of your code. It will continue to execute as it always has. Those warning are simply telling you that you are not taking advantage of the compile-time type safety offered by generics, introduced in 1.5. The way to fix that would be to start using generics. If that code is not under active development and you don't want to go messing around in code that already works, you can safely ignore them.
The consequences of ignoring them are:
1) You now have a lot of clutter in your compiler output, making it harder to spot actual error messages, and harder to isolate those warnings that you do care about.
2) Even though your code is running fine, it's possible that you've got type errors somewhere (illegal casts, for example) that simply haven't been hit yet, or that are being hit but you're not noticing. Proper application of generics may bring those out at compile time.
If you want to get rid of the warnings without fully adopting generics, you can use the @SupressWarnings("unchecked") annotation. However, use this with caution, as you're telling the compiler to ignore something that, while syntactically legal, is potentially dangerous.