From 6640baf57d10e6bc54b79955e3477534682b742f Mon Sep 17 00:00:00 2001 From: Thomas Wolf Date: Wed, 20 Oct 2021 21:17:55 +0200 Subject: [PATCH] Minor code-clean-up in OpenSshConfigFile Change-Id: I45d50198e43aeb2a56c74026de7ee8c1a30f9d10 Signed-off-by: Thomas Wolf --- .../jgit/internal/transport/ssh/OpenSshConfigFile.java | 5 ++--- 1 file 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 228c25f0a..a7a143328 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 @@ private List parse(BufferedReader reader) // 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 @@ private List parseList(String argument) { * @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;