Is it possible to solve the “A generic array of T is created for a varargs parameter” compiler warning?

In Java 6, other than adding @SuppressWarnings("unchecked"), I don’t think so.

This bug report has more information but it boils down to the compiler not liking arrays of generic types.

Leave a Comment