Skip to content

Commit

Permalink
[dscalarm] Removed dependency on 'org.apache.commons.io.IOUtils'
Browse files Browse the repository at this point in the history
Relative to openhab#7722

Signed-off-by: Laurent Garnier <[email protected]
  • Loading branch information
lolodomo committed May 22, 2020
1 parent efc84f1 commit 874908d
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import java.io.UnsupportedEncodingException;
import java.util.TooManyListenersException;

import org.apache.commons.io.IOUtils;
import org.eclipse.smarthome.core.thing.Bridge;
import org.eclipse.smarthome.core.thing.ThingStatus;
import org.eclipse.smarthome.io.transport.serial.PortInUseException;
Expand Down Expand Up @@ -189,12 +188,18 @@ public void closeConnection() {
serialPort.removeEventListener();

if (serialInput != null) {
IOUtils.closeQuietly(serialInput);
try {
serialInput.close();
} catch (IOException e) {
}
serialInput = null;
}

if (serialOutput != null) {
IOUtils.closeQuietly(serialOutput);
try {
serialOutput.close();
} catch (IOException e) {
}
serialOutput = null;
}

Expand Down

0 comments on commit 874908d

Please sign in to comment.