mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
增加判定非空
This commit is contained in:
parent
cbf16443dd
commit
35dd387cb9
@ -57,6 +57,8 @@ public final class LazyFunLoader<T> extends LazyLoader<T> {
|
||||
*/
|
||||
public void ifInitialized(Consumer<T> consumer) {
|
||||
|
||||
Assert.notNull(consumer);
|
||||
|
||||
// 已经初始化
|
||||
if (this.isInitialize()) {
|
||||
consumer.accept(this.get());
|
||||
|
Loading…
x
Reference in New Issue
Block a user