diff --git a/java_console/io/src/main/java/com/rusefi/io/LinkManager.java b/java_console/io/src/main/java/com/rusefi/io/LinkManager.java index a580d8d956..eb12eb4fb8 100644 --- a/java_console/io/src/main/java/com/rusefi/io/LinkManager.java +++ b/java_console/io/src/main/java/com/rusefi/io/LinkManager.java @@ -6,7 +6,6 @@ import com.rusefi.Callable; import com.rusefi.NamedThreadFactory; import com.rusefi.binaryprotocol.BinaryProtocol; import com.rusefi.binaryprotocol.BinaryProtocolState; -import com.rusefi.binaryprotocol.IncomingDataBuffer; import com.rusefi.core.EngineState; import com.rusefi.io.serial.StreamConnector; import com.rusefi.io.serial.SerialIoStreamJSerialComm; @@ -201,12 +200,10 @@ public class LinkManager { setConnector(new StreamConnector(this, port, logger, streamFactory)); isSimulationMode = true; } else { - Callable ioStreamCallable = () -> SerialIoStreamJSerialComm.openPort(port, logger); - - Callable ioStreamCallable1 = new Callable() { + Callable ioStreamCallable = new Callable() { @Override public IoStream call() { - IoStream stream = ioStreamCallable.call(); + IoStream stream = ((Callable) () -> SerialIoStreamJSerialComm.openPort(port, logger)).call(); if (stream == null) { // error already reported return null; @@ -214,7 +211,7 @@ public class LinkManager { return stream; } }; - setConnector(new StreamConnector(this, port, logger, ioStreamCallable1)); + setConnector(new StreamConnector(this, port, logger, ioStreamCallable)); } }