Fix compile problem for JDK 1.4

git-svn-id: https://zxing.googlecode.com/svn/trunk@16 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2007-11-07 18:42:40 +00:00
parent 9b296c7e1e
commit e73dd9a068

View file

@ -34,11 +34,12 @@ public final class CollectionsTestCase extends TestCase {
} }
Collections.insertionSort(v, new Comparator() { Collections.insertionSort(v, new Comparator() {
public int compare(Object o1, Object o2) { public int compare(Object o1, Object o2) {
return (Integer) o1 - (Integer) o2; return ((Integer) o1).intValue() - ((Integer) o2).intValue();
} }
}); });
for (int i = 1; i < 100; i++) { for (int i = 1; i < 100; i++) {
assertTrue("Element " + i, (Integer) v.elementAt(i-1) <= (Integer) v.elementAt(i)); assertTrue("Element " + i, ((Integer) v.elementAt(i-1)).intValue() <=
((Integer) v.elementAt(i)).intValue());
} }
} }