Unnecessary lambda usage
authorTomas Wenström <tomas.wenstrom@gmail.com>
Sat, 23 Mar 2019 10:56:05 +0000 (11:56 +0100)
committerTomas Wenström <tomas.wenstrom@gmail.com>
Sat, 23 Mar 2019 10:56:05 +0000 (11:56 +0100)
src/kaka/cakelight/VideoDeviceListener.java

index 23c0b02..ce2a5e7 100644 (file)
@@ -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);
                    }