mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
增加判定非空
This commit is contained in:
@@ -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());
|
||||
|
Reference in New Issue
Block a user