Removed Java 7 backport Socket utilities (#880)

This commit is contained in:
exceptionfactory
2023-07-17 09:47:56 -05:00
committed by GitHub
parent f35c2bd4ce
commit ec69d109e8
4 changed files with 2 additions and 125 deletions

View File

@@ -22,8 +22,6 @@ import java.io.IOException;
import java.net.Socket;
import java.util.concurrent.TimeUnit;
import static com.hierynomus.sshj.backport.Sockets.asCloseable;
public class SocketStreamCopyMonitor
extends Thread {
@@ -43,7 +41,7 @@ public class SocketStreamCopyMonitor
await(y);
} catch (IOException ignored) {
} finally {
IOUtils.closeQuietly(channel, asCloseable(socket));
IOUtils.closeQuietly(channel, socket);
}
}

View File

@@ -29,8 +29,6 @@ import java.net.Socket;
import java.net.SocketException;
import java.util.concurrent.TimeUnit;
import static com.hierynomus.sshj.backport.Sockets.asCloseable;
public class LocalPortForwarder {
public static class ForwardedChannel
@@ -78,7 +76,7 @@ public class LocalPortForwarder {
chan.open();
chan.start();
} catch (IOException e) {
IOUtils.closeQuietly(chan, asCloseable(socket));
IOUtils.closeQuietly(chan, socket);
throw e;
}
}