Skip to content

Commit ec69d10

Browse files
Removed Java 7 backport Socket utilities (#880)
1 parent f35c2bd commit ec69d10

File tree

4 files changed

+2
-125
lines changed

4 files changed

+2
-125
lines changed

src/main/java/com/hierynomus/sshj/backport/Jdk7HttpProxySocket.java

-78
This file was deleted.

src/main/java/com/hierynomus/sshj/backport/Sockets.java

-41
This file was deleted.

src/main/java/net/schmizz/sshj/connection/channel/SocketStreamCopyMonitor.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
import java.net.Socket;
2323
import java.util.concurrent.TimeUnit;
2424

25-
import static com.hierynomus.sshj.backport.Sockets.asCloseable;
26-
2725
public class SocketStreamCopyMonitor
2826
extends Thread {
2927

@@ -43,7 +41,7 @@ public void run() {
4341
await(y);
4442
} catch (IOException ignored) {
4543
} finally {
46-
IOUtils.closeQuietly(channel, asCloseable(socket));
44+
IOUtils.closeQuietly(channel, socket);
4745
}
4846
}
4947

src/main/java/net/schmizz/sshj/connection/channel/direct/LocalPortForwarder.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
import java.net.SocketException;
3030
import java.util.concurrent.TimeUnit;
3131

32-
import static com.hierynomus.sshj.backport.Sockets.asCloseable;
33-
3432
public class LocalPortForwarder {
3533

3634
public static class ForwardedChannel
@@ -78,7 +76,7 @@ private void startChannel(Socket socket) throws IOException {
7876
chan.open();
7977
chan.start();
8078
} catch (IOException e) {
81-
IOUtils.closeQuietly(chan, asCloseable(socket));
79+
IOUtils.closeQuietly(chan, socket);
8280
throw e;
8381
}
8482
}

0 commit comments

Comments
 (0)