diff options
author | Thomas Wolf <thomas.wolf@paranor.ch> | 2021-10-20 21:17:55 +0200 |
---|---|---|
committer | Thomas Wolf <thomas.wolf@paranor.ch> | 2021-10-24 21:35:51 +0200 |
commit | 6640baf57d10e6bc54b79955e3477534682b742f (patch) | |
tree | 8773d6d5305d33e3249f1a9f116dae1c3a28c325 /org.eclipse.jgit/src/org | |
parent | 4b4a95b1bbd910976bf872b18ac6cab5944d531c (diff) | |
download | jgit-6640baf57d10e6bc54b79955e3477534682b742f.tar.gz jgit-6640baf57d10e6bc54b79955e3477534682b742f.zip |
Minor code-clean-up in OpenSshConfigFile
Change-Id: I45d50198e43aeb2a56c74026de7ee8c1a30f9d10
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jgit/src/org')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java index 228c25f0a5..a7a1433283 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java @@ -210,7 +210,7 @@ public class OpenSshConfigFile implements SshConfigStore { // The man page doesn't say so, but the openssh parser (readconf.c) // starts out in active mode and thus always applies any lines that // occur before the first host block. We gather those options in a - // HostEntry for DEFAULT_NAME. + // HostEntry. HostEntry defaults = new HostEntry(); HostEntry current = defaults; entries.add(defaults); @@ -309,8 +309,7 @@ public class OpenSshConfigFile implements SshConfigStore { * @return the validated and possibly sanitized value */ protected String validate(String key, String value) { - if (String.CASE_INSENSITIVE_ORDER.compare(key, - SshConstants.PREFERRED_AUTHENTICATIONS) == 0) { + if (SshConstants.PREFERRED_AUTHENTICATIONS.equalsIgnoreCase(key)) { return stripWhitespace(value); } return value; |