diff options
author | Thomas Wolf <thomas.wolf@paranor.ch> | 2018-11-17 18:44:27 +0100 |
---|---|---|
committer | Thomas Wolf <thomas.wolf@paranor.ch> | 2018-11-17 18:55:06 +0100 |
commit | c567b6ecde6b055441f52f0f36dcf8b9d0fe5068 (patch) | |
tree | e50c57f8945a2a8eec911e5e6f9e8bb6cc21d883 /org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd | |
parent | 00b235f0b86769ec6781a8114cd741f3cba08de5 (diff) | |
download | jgit-c567b6ecde6b055441f52f0f36dcf8b9d0fe5068.tar.gz jgit-c567b6ecde6b055441f52f0f36dcf8b9d0fe5068.zip |
Apache MINA sshd client: don't leak HostConfigEntry
ProxyDataFactory had a parameter of type HostConfigEntry, but actually
it wasn't used anywhere. Remove it -- it was the last leaked type from
Apache MINA sshd.
Also use the logger provided by upstream SshClient instead of creating
a new Logger.
Bug: 520927
Change-Id: Iaa78bbb998a5e574fa091664b75c48a3b9cfb897
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd')
2 files changed, 2 insertions, 9 deletions
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/DefaultProxyDataFactory.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/DefaultProxyDataFactory.java index d83e31fa2b..97e0da0428 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/DefaultProxyDataFactory.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/DefaultProxyDataFactory.java @@ -50,8 +50,6 @@ import java.net.URI; import java.net.URISyntaxException; import java.util.List; -import org.apache.sshd.client.config.hosts.HostConfigEntry; - /** * A default implementation of a {@link ProxyDataFactory} based on the standard * {@link java.net.ProxySelector}. @@ -61,8 +59,7 @@ import org.apache.sshd.client.config.hosts.HostConfigEntry; public class DefaultProxyDataFactory implements ProxyDataFactory { @Override - public ProxyData get(HostConfigEntry hostConfig, - InetSocketAddress remoteAddress) { + public ProxyData get(InetSocketAddress remoteAddress) { try { List<Proxy> proxies = ProxySelector.getDefault() .select(new URI(Proxy.Type.SOCKS.name(), diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/ProxyDataFactory.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/ProxyDataFactory.java index 1446d6ecea..334fff4f64 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/ProxyDataFactory.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/ProxyDataFactory.java @@ -44,8 +44,6 @@ package org.eclipse.jgit.transport.sshd; import java.net.InetSocketAddress; -import org.apache.sshd.client.config.hosts.HostConfigEntry; - /** * Interface for obtaining {@link ProxyData} to connect through some proxy. * @@ -59,12 +57,10 @@ public interface ProxyDataFactory { * {@link ProxyData} contains a password, the {@link SshdSession} will clear * it once it is no longer needed. * - * @param hostConfig - * from the ssh config that we're going to connect for * @param remoteAddress * to connect to * @return the {@link ProxyData} or {@code null} if a direct connection is * to be made */ - ProxyData get(HostConfigEntry hostConfig, InetSocketAddress remoteAddress); + ProxyData get(InetSocketAddress remoteAddress); } |