mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复CollUtil.lastIndexOf序号错误问题
This commit is contained in:
@@ -1608,12 +1608,12 @@ public class CollUtil {
|
||||
}
|
||||
int matchIndex = -1;
|
||||
if (isNotEmpty(collection)) {
|
||||
int index = collection.size();
|
||||
int index = 0;
|
||||
for (T t : collection) {
|
||||
if (null == matcher || matcher.match(t)) {
|
||||
matchIndex = index;
|
||||
}
|
||||
index--;
|
||||
index++;
|
||||
}
|
||||
}
|
||||
return matchIndex;
|
||||
|
Reference in New Issue
Block a user