diff --git a/src/main/java/org/apache/commons/collections4/iterators/PermutationIterator.java b/src/main/java/org/apache/commons/collections4/iterators/PermutationIterator.java index 616007fbd..c0a5d5663 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/PermutationIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/PermutationIterator.java @@ -84,7 +84,7 @@ public class PermutationIterator implements Iterator> { int value = 1; objectMap = new HashMap(); for (E e : coll) { - objectMap.put(value, e); + objectMap.put(Integer.valueOf(value), e); keys[value - 1] = value; value++; } @@ -142,7 +142,7 @@ public class PermutationIterator implements Iterator> { if (keys[i] > largestKey) { direction[i] = !direction[i]; } - nextP.add(objectMap.get(keys[i])); + nextP.add(objectMap.get(Integer.valueOf(keys[i]))); } final List result = nextPermutation; nextPermutation = nextP; diff --git a/src/main/java/org/apache/commons/collections4/queue/CircularFifoQueue.java b/src/main/java/org/apache/commons/collections4/queue/CircularFifoQueue.java index 05cfdaf9c..86ca82ad4 100644 --- a/src/main/java/org/apache/commons/collections4/queue/CircularFifoQueue.java +++ b/src/main/java/org/apache/commons/collections4/queue/CircularFifoQueue.java @@ -256,7 +256,7 @@ public class CircularFifoQueue extends AbstractCollection if (index < 0 || index >= sz) { throw new NoSuchElementException( String.format("The specified index (%1$d) is outside the available range [0, %2$d)", - index, sz)); + Integer.valueOf(index), Integer.valueOf(sz))); } final int idx = (start + index) % maxElements;