From: Matthias Sohn Date: Fri, 25 Aug 2017 22:48:59 +0000 (+0200) Subject: Add toString() methods to OpenSshConfig to help debugging X-Git-Tag: v4.9.0.201710071750-r~72 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fchanges%2F26%2F103726%2F2;p=jgit.git Add toString() methods to OpenSshConfig to help debugging Change-Id: I81b60a13a97e78d5ccd593ba8e4aa614df19f925 Signed-off-by: Matthias Sohn --- diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/OpenSshConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/OpenSshConfig.java index 2c547afea6..b5b532dffd 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/OpenSshConfig.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/OpenSshConfig.java @@ -173,6 +173,12 @@ public class OpenSshConfig implements ConfigRepository { private static class State { Map entries = new LinkedHashMap<>(); Map hosts = new HashMap<>(); + + @Override + @SuppressWarnings("nls") + public String toString() { + return "State [entries=" + entries + ", hosts=" + hosts + "]"; + } } /** State read from the config file, plus {@link Host}s created from it. */ @@ -750,6 +756,13 @@ public class OpenSshConfig implements ConfigRepository { // anyway. ControlPath, LocalCommand, ProxyCommand, and // RemoteCommand are not used by Jsch. } + + @Override + @SuppressWarnings("nls") + public String toString() { + return "HostEntry [options=" + options + ", multiOptions=" + + multiOptions + ", listOptions=" + listOptions + "]"; + } } /** @@ -910,6 +923,17 @@ public class OpenSshConfig implements ConfigRepository { Config getConfig() { return config; } + + @Override + @SuppressWarnings("nls") + public String toString() { + return "Host [hostName=" + hostName + ", port=" + port + + ", identityFile=" + identityFile + ", user=" + user + + ", preferredAuthentications=" + preferredAuthentications + + ", batchMode=" + batchMode + ", strictHostKeyChecking=" + + strictHostKeyChecking + ", connectionAttempts=" + + connectionAttempts + ", config=" + config + "]"; + } } /** @@ -926,4 +950,11 @@ public class OpenSshConfig implements ConfigRepository { Host host = lookup(hostName); return host.getConfig(); } + + @Override + @SuppressWarnings("nls") + public String toString() { + return "OpenSshConfig [home=" + home + ", configFile=" + configFile + + ", lastModified=" + lastModified + ", state=" + state + "]"; + } }