Community
Participate
Working Groups
The following method overloading will produce a "Duplicate method" error with jdk1.5: public static String[] convertList(Collection<String> list){ String[] ret = new String[list.size()]; Iterator<String> it = list.iterator(); for( int i=0; it.hasNext(); i++ ){ ret[i] = it.next(); } return ret; } public static int[] convertList(Collection<Integer> list){ int[] ret = new int[list.size()]; Iterator<Integer> it = list.iterator(); for( int i=0; it.hasNext(); i++ ){ ret[i] = (it.next()).intValue(); } return ret; }
Created attachment 18772 [details] Test case
Added GenericType test561
Verified in 20050330-0500