From 564d6e673e5909a4af4c36c70e3eb341ed65f972 Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Wed, 3 Jan 2024 12:15:41 +0100 Subject: [PATCH] Fix `SerialPort.getFlowControlMode()` infinite recursion (#4007) An infinite recursion would occur when calling this method. I did not find any add-ons using this method but that could be due to this bug. Signed-off-by: Wouter Born --- .../core/io/transport/serial/internal/SerialPortImpl.java | 2 +- .../openhab/core/io/transport/serial/rxtx/RxTxSerialPort.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.core.io.transport.serial.javacomm/src/main/java/org/openhab/core/io/transport/serial/internal/SerialPortImpl.java b/bundles/org.openhab.core.io.transport.serial.javacomm/src/main/java/org/openhab/core/io/transport/serial/internal/SerialPortImpl.java index 021c5539b..cde5107e2 100644 --- a/bundles/org.openhab.core.io.transport.serial.javacomm/src/main/java/org/openhab/core/io/transport/serial/internal/SerialPortImpl.java +++ b/bundles/org.openhab.core.io.transport.serial.javacomm/src/main/java/org/openhab/core/io/transport/serial/internal/SerialPortImpl.java @@ -206,7 +206,7 @@ public class SerialPortImpl implements SerialPort { @Override public int getFlowControlMode() { - return getFlowControlMode(); + return sp.getFlowControlMode(); } @Override diff --git a/bundles/org.openhab.core.io.transport.serial.rxtx/src/main/java/org/openhab/core/io/transport/serial/rxtx/RxTxSerialPort.java b/bundles/org.openhab.core.io.transport.serial.rxtx/src/main/java/org/openhab/core/io/transport/serial/rxtx/RxTxSerialPort.java index 90f7e6eeb..4683215c4 100644 --- a/bundles/org.openhab.core.io.transport.serial.rxtx/src/main/java/org/openhab/core/io/transport/serial/rxtx/RxTxSerialPort.java +++ b/bundles/org.openhab.core.io.transport.serial.rxtx/src/main/java/org/openhab/core/io/transport/serial/rxtx/RxTxSerialPort.java @@ -206,7 +206,7 @@ public class RxTxSerialPort implements SerialPort { @Override public int getFlowControlMode() { - return getFlowControlMode(); + return sp.getFlowControlMode(); } @Override