Details
-
Improvement
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
4.0
-
None
-
None
Description
In CollectionUtils.get(Object, int) on Line 1250, the code in the condition:
CollectionUtils.java
else if (object instanceof Iterator<?>) { final Iterator<?> it = (Iterator<?>) object; while (it.hasNext()) { i--; if (i == -1) { return it.next(); } it.next(); } throw new IndexOutOfBoundsException("Entry does not exist: " + i); }
Can be replaced with just a call to CollectionUtils.get(Iterator, int), on Line 1176.