mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix code
This commit is contained in:
parent
82fb4e22b1
commit
83798c3bf7
@ -1181,11 +1181,9 @@ public class EasyStream<T> implements Stream<T>, Iterable<T> {
|
||||
* @param idx 下标
|
||||
* @return 指定下标的元素
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<T> at(final Integer idx) {
|
||||
return Opt.ofNullable(idx).map(i -> {
|
||||
//noinspection unchecked
|
||||
return (T) ArrayUtil.get(toArray(), i);
|
||||
}).toOptional();
|
||||
return Opt.ofNullable(idx).map(i -> (T) ArrayUtil.get(toArray(), i)).toOptional();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1025,7 +1025,7 @@ public class ArrayUtil extends PrimitiveArrayUtil {
|
||||
if (null == array) {
|
||||
return null;
|
||||
}
|
||||
if(null == indexes){
|
||||
if (null == indexes) {
|
||||
return newArray(array.getClass().getComponentType(), 0);
|
||||
}
|
||||
|
||||
@ -1553,6 +1553,7 @@ public class ArrayUtil extends PrimitiveArrayUtil {
|
||||
* 是否存在{@code null}或空对象,通过{@link ObjUtil#isEmpty(Object)} 判断元素<br>
|
||||
* 如果提供数组本身为空,
|
||||
*
|
||||
* @param <T> 元素类型
|
||||
* @param args 被检查对象
|
||||
* @return 是否存在
|
||||
* @since 4.5.18
|
||||
|
Loading…
x
Reference in New Issue
Block a user