posted 16 years ago
Rather than "live with the warning", you can put the offending code in a small private method, then tell the compiler to ignore that particular warning using the SuppressWarnings annotation:
It's also possible to put SuppressWarnings on the entire class, but that's usually not a good idea, as these warnings are a good thing in general, and you don't want to start ignoring all warnings.
But really, you're much better off just following EFH's later advice:
[EFH]: Instead of using an array, use a collection!
Arrays and generics don't mix well. Collections and generics do. If you're using generics at all, prefer collections whenever possible.
"I'm not back." - Bill Harding, Twister