From: Tomas Wenström Date: Sat, 23 Mar 2019 10:56:05 +0000 (+0100) Subject: Unnecessary lambda usage X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=dcef78901ed32c81c91164c2ba45d21d44ac24f6;p=kaka%2Fcakelight.git Unnecessary lambda usage --- diff --git a/src/kaka/cakelight/VideoDeviceListener.java b/src/kaka/cakelight/VideoDeviceListener.java index 23c0b02..ce2a5e7 100644 --- a/src/kaka/cakelight/VideoDeviceListener.java +++ b/src/kaka/cakelight/VideoDeviceListener.java @@ -20,7 +20,7 @@ public class VideoDeviceListener { if (!device.equals(Optional.ofNullable(lastDevice))) { log("Video device change: %s", device.map(File::getAbsolutePath).orElse("none")); changeConsumer.accept(device); - lastDevice = device.orElseGet(() -> null); + lastDevice = device.orElse(null); } Thread.sleep(1000); }