diff --git a/src/main/java/fr/univamu/sorting/InsertionSort.java b/src/main/java/fr/univamu/sorting/InsertionSort.java index 7cdc71953ef2e810b89069ea58b5f5a0251cc7c9..1b687954a0a4544e137725c78961d3a65b8df16b 100644 --- a/src/main/java/fr/univamu/sorting/InsertionSort.java +++ b/src/main/java/fr/univamu/sorting/InsertionSort.java @@ -19,7 +19,7 @@ public class InsertionSort<T extends Comparable<T>> implements Sorter<T> { T key = sortable.get(i); int j = i - 1; - while (j >= 0 && sortable.compare(j, key) > 0) { + while (j >= 0 && sortable.compare(j, (Integer) key) > 0) { sortable.Swap(j + 1, j); j = j - 1; }