mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix
This commit is contained in:
@@ -553,6 +553,9 @@ public class IterUtil {
|
||||
* @since 5.8.0
|
||||
*/
|
||||
public static <E> E get(final Iterator<E> iterator, int index) throws IndexOutOfBoundsException {
|
||||
if(null == iterator){
|
||||
return null;
|
||||
}
|
||||
Assert.isTrue(index >= 0, "[index] must be >= 0");
|
||||
while (iterator.hasNext()) {
|
||||
index--;
|
||||
|
Reference in New Issue
Block a user