Minor code-clean-up in OpenSshConfigFile

Change-Id: I45d50198e43aeb2a56c74026de7ee8c1a30f9d10
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
This commit is contained in:
Thomas Wolf 2021-10-20 21:17:55 +02:00
parent 4b4a95b1bb
commit 6640baf57d
1 changed files with 2 additions and 3 deletions

View File

@ -210,7 +210,7 @@ private List<HostEntry> 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<String> 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;