Skip to content

Commit

Permalink
[enocean] Removed dependency on 'org.apache.commons.io.IOUtils' (open…
Browse files Browse the repository at this point in the history
…hab#7731)

Relative to openhab#7722

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
  • Loading branch information
lolodomo authored and J-N-K committed Jul 14, 2020
1 parent 0053b7d commit c6a93ce
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit c6a93ce

Please sign in to comment.