Fascinating. This class contains both toArray(ArrayList<Integer> lits) and

toArray(ArrayList<Float> list) which erase to the same argument types. They
differ in return types which means that the JVM recognizes them as different,
so when the compiler resolved that it needed to call
"toArray(Ljava/util/ArrayList;)[F", it was not a problem that
"toArray(Ljava/util/ArrayList;)[I" also existed.

javac 1.7 is a bit stricter about this sort of thing and issues a concerned
warning message. Since the ArrayList<Integer> version is not used, I'm nixing
it to avoid confusion.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@903 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Michael Bayne
2010-03-16 23:26:27 +00:00
parent 4145611b9c
commit c484d10a48
@@ -948,16 +948,6 @@ public class ModelDef
return true;
}
/** Converts a boxed Integer list to an unboxed int array. */
protected static int[] toArray (ArrayList<Integer> list)
{
int[] array = new int[list.size()];
for (int ii = 0, nn = list.size(); ii < nn; ii++) {
array[ii] = list.get(ii);
}
return array;
}
/** Converts a boxed Float list to an unboxed float array. */
protected static float[] toArray (ArrayList<Float> list)
{