mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
Merge branch 'v6-dev' of github.com:dromara/hutool into v6-dev
This commit is contained in:
commit
7f129b6ae3
@ -386,6 +386,9 @@ public class ListUtil {
|
|||||||
* @since 4.0.6
|
* @since 4.0.6
|
||||||
*/
|
*/
|
||||||
public static <T> List<T> reverse(final List<T> list) {
|
public static <T> List<T> reverse(final List<T> list) {
|
||||||
|
if (CollUtil.isEmpty(list)) {
|
||||||
|
return list;
|
||||||
|
}
|
||||||
Collections.reverse(list);
|
Collections.reverse(list);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user