I have used JSON library from external provider (google code project) which have a class JSONArray
defined this way:
public class JSONArray extends ArrayList implements List , ... {
So it has a Collection
's method .addAll( Collection<? extends E> elements )
but of course, simple usage:
JSONArray someData = new JSONArray();
someData.addAll( Arrays.asList( new String[] {"a","b"} ) );
rises unchecked warning, same with explicit call to Arrays.<String>asList
.
Is there a way to remove this warning without marking whole method with @SuppressWarnings or extract this operation to another method with @SuppressWarnings?