mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
优化所调用的ObjectUtil#defaultIfNull避免重复创建
This commit is contained in:
@@ -142,10 +142,7 @@ public enum ClipboardMonitor implements ClipboardOwner, Runnable, Closeable {
|
||||
|
||||
if (isRunning) {
|
||||
// 继续监听
|
||||
clipboard.setContents(
|
||||
ObjectUtil.defaultIfNull(transferable,
|
||||
() -> ObjectUtil.defaultIfNull(newContents, contents)),
|
||||
this);
|
||||
clipboard.setContents(ObjectUtil.defaultIfNull(transferable, ObjectUtil.defaultIfNull(newContents, contents)), this);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user