Skip to content

Commit

Permalink
Removed Java 7 backport Socket utilities (#880)
Browse files Browse the repository at this point in the history
  • Loading branch information
exceptionfactory authored Jul 17, 2023
1 parent f35c2bd commit ec69d10
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 125 deletions.

This file was deleted.

41 changes: 0 additions & 41 deletions src/main/java/com/hierynomus/sshj/backport/Sockets.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
import java.net.Socket;
import java.util.concurrent.TimeUnit;

import static com.hierynomus.sshj.backport.Sockets.asCloseable;

public class SocketStreamCopyMonitor
extends Thread {

Expand All @@ -43,7 +41,7 @@ public void run() {
await(y);
} catch (IOException ignored) {
} finally {
IOUtils.closeQuietly(channel, asCloseable(socket));
IOUtils.closeQuietly(channel, socket);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
import java.net.SocketException;
import java.util.concurrent.TimeUnit;

import static com.hierynomus.sshj.backport.Sockets.asCloseable;

public class LocalPortForwarder {

public static class ForwardedChannel
Expand Down Expand Up @@ -78,7 +76,7 @@ private void startChannel(Socket socket) throws IOException {
chan.open();
chan.start();
} catch (IOException e) {
IOUtils.closeQuietly(chan, asCloseable(socket));
IOUtils.closeQuietly(chan, socket);
throw e;
}
}
Expand Down

0 comments on commit ec69d10

Please sign in to comment.