优化所调用的ObjectUtil#defaultIfNull避免重复创建

This commit is contained in:
Looly
2024-11-05 17:58:11 +08:00
parent 270b9d2ff5
commit 4224e86461
2 changed files with 3 additions and 5 deletions

View File

@@ -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);
}
}