Skip to content

Commit

Permalink
[powermax] 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 6957f7a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import java.util.ArrayList;
import java.util.List;

import org.apache.commons.io.IOUtils;
import org.openhab.binding.powermax.internal.message.PowermaxBaseMessage;
import org.openhab.binding.powermax.internal.message.PowermaxMessageEvent;
import org.openhab.binding.powermax.internal.message.PowermaxMessageEventListener;
Expand Down Expand Up @@ -63,11 +62,17 @@ protected void cleanup() {
}

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

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

readerThread = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.net.SocketTimeoutException;
import java.net.UnknownHostException;

import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -90,7 +89,10 @@ public void close() {
super.cleanup();

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

tcpSocket = null;
Expand Down

0 comments on commit 6957f7a

Please sign in to comment.