Author: sebb
Date: Sun Apr 28 14:20:56 2013
New Revision: 1476781
URL: http://svn.apache.org/r1476781
Log:
Explicit boxing
This documents that the boxing is actually intended, rather than an error due
to the accidental use of the wrong type.
Modified:
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/PermutationIterator.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/queue/CircularFifoQueue.java
Modified:
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/PermutationIterator.java
URL:
http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/PermutationIterator.java?rev=1476781&r1=1476780&r2=1476781&view=diff
==============================================================================
---
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/PermutationIterator.java
(original)
+++
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/PermutationIterator.java
Sun Apr 28 14:20:56 2013
@@ -84,7 +84,7 @@ public class PermutationIterator<E> impl
int value = 1;
objectMap = new HashMap<Integer, E>();
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<E> impl
if (keys[i] > largestKey) {
direction[i] = !direction[i];
}
- nextP.add(objectMap.get(keys[i]));
+ nextP.add(objectMap.get(Integer.valueOf(keys[i])));
}
final List<E> result = nextPermutation;
nextPermutation = nextP;
Modified:
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/queue/CircularFifoQueue.java
URL:
http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/queue/CircularFifoQueue.java?rev=1476781&r1=1476780&r2=1476781&view=diff
==============================================================================
---
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/queue/CircularFifoQueue.java
(original)
+++
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/queue/CircularFifoQueue.java
Sun Apr 28 14:20:56 2013
@@ -256,7 +256,7 @@ public class CircularFifoQueue<E> extend
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;