cqyanbo / json-simple

Automatically exported from code.google.com/p/json-simple
Apache License 2.0
0 stars 0 forks source link

JSONArray extends ArrayList, should be JSONArray<E> and extend ArrayList<E> #84

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
As JSONArray extends ArrayList it has all of it's methods, so it should use 
generics. For example simple call to addAll will rise unchecked warning:

JSONArray someData = new JSONArray();
someData.addAll( Arrays.asList( new String[] {"a","b"} ) );

Should be possible:

JSONArray<String> someData = new JSONArray<>();
someData.addAll( Arrays.asList( new String[] {"a","b"} ) ); // no unchecked 
warning

Original issue reported on code.google.com by kajlermo...@gmail.com on 8 Jun 2013 at 1:58

GoogleCodeExporter commented 8 years ago

Original comment by fangyid...@gmail.com on 2 Jul 2013 at 2:17