From 0d7f5b637378cbac03c4f11efaf9f8be879d6e70 Mon Sep 17 00:00:00 2001 From: lolodomo Date: Mon, 25 May 2020 17:50:27 +0200 Subject: [PATCH] [enocean] Removed dependency on 'org.apache.commons.io.IOUtils' (#7731) Relative to #7722 Signed-off-by: Laurent Garnier --- .../internal/transceiver/EnOceanTransceiver.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/bundles/org.openhab.binding.enocean/src/main/java/org/openhab/binding/enocean/internal/transceiver/EnOceanTransceiver.java b/bundles/org.openhab.binding.enocean/src/main/java/org/openhab/binding/enocean/internal/transceiver/EnOceanTransceiver.java index b3fde1a517b3f..44f217d51625f 100644 --- a/bundles/org.openhab.binding.enocean/src/main/java/org/openhab/binding/enocean/internal/transceiver/EnOceanTransceiver.java +++ b/bundles/org.openhab.binding.enocean/src/main/java/org/openhab/binding/enocean/internal/transceiver/EnOceanTransceiver.java @@ -25,7 +25,6 @@ import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; -import org.apache.commons.io.IOUtils; import org.eclipse.smarthome.core.util.HexUtils; import org.eclipse.smarthome.io.transport.serial.PortInUseException; import org.eclipse.smarthome.io.transport.serial.SerialPort; @@ -219,11 +218,19 @@ public void ShutDown() { if (outputStream != null) { logger.debug("Closing serial output stream"); - IOUtils.closeQuietly(outputStream); + try { + outputStream.close(); + } catch (IOException e) { + logger.debug("Error while closing the output stream: {}", e.getMessage()); + } } if (inputStream != null) { logger.debug("Closeing serial input stream"); - IOUtils.closeQuietly(inputStream); + try { + inputStream.close(); + } catch (IOException e) { + logger.debug("Error while closing the input stream: {}", e.getMessage()); + } } if (serialPort != null) {