mirror of
https://gitee.com/dromara/hutool.git
synced 2025-05-04 20:58:00 +08:00
fix code
This commit is contained in:
parent
4e11aeea37
commit
6af1d4f24c
@ -55,7 +55,7 @@ import java.util.function.Supplier;
|
|||||||
* .with(Map::put, "blue", "#0000FF")
|
* .with(Map::put, "blue", "#0000FF")
|
||||||
* .build();
|
* .build();
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* <p>注意:本工具类支持调用的构造方法的参数数量不超过5个,一般方法的参数数量不超过2个,更多的参数不利于阅读和维护。</p>
|
* <p>注意:本工具类支持调用的构造方法的参数数量不超过5个,一般方法的参数数量不超过2个,更多的参数不利于阅读和维护。</p>
|
||||||
*
|
*
|
||||||
* @author TomXin
|
* @author TomXin
|
||||||
|
@ -3,7 +3,6 @@ package cn.hutool.core.lang;
|
|||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.map.MapUtil;
|
import cn.hutool.core.map.MapUtil;
|
||||||
import cn.hutool.core.util.ArrayUtil;
|
import cn.hutool.core.util.ArrayUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -193,7 +192,7 @@ public class Assert {
|
|||||||
* @since 5.4.5
|
* @since 5.4.5
|
||||||
*/
|
*/
|
||||||
public static <T, X extends Throwable> T notNull(T object, Supplier<X> errorSupplier) throws X {
|
public static <T, X extends Throwable> T notNull(T object, Supplier<X> errorSupplier) throws X {
|
||||||
if (ObjectUtil.isNull(object)) {
|
if (null == object) {
|
||||||
throw errorSupplier.get();
|
throw errorSupplier.get();
|
||||||
}
|
}
|
||||||
return object;
|
return object;
|
||||||
|
@ -16,8 +16,8 @@ public interface Consumer3<P1, P2, P3> {
|
|||||||
* 接收参数方法
|
* 接收参数方法
|
||||||
*
|
*
|
||||||
* @param p1 参数一
|
* @param p1 参数一
|
||||||
* @param p1 参数二
|
* @param p2 参数二
|
||||||
* @param p2 参数三
|
* @param p3 参数三
|
||||||
*/
|
*/
|
||||||
void accept(P1 p1, P2 p2, P3 p3);
|
void accept(P1 p1, P2 p2, P3 p3);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user