Minor code-clean-up in OpenSshConfigFile
Change-Id: I45d50198e43aeb2a56c74026de7ee8c1a30f9d10 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
This commit is contained in:
parent
4b4a95b1bb
commit
6640baf57d
|
@ -210,7 +210,7 @@ private List<HostEntry> parse(BufferedReader reader)
|
||||||
// The man page doesn't say so, but the openssh parser (readconf.c)
|
// 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
|
// starts out in active mode and thus always applies any lines that
|
||||||
// occur before the first host block. We gather those options in a
|
// occur before the first host block. We gather those options in a
|
||||||
// HostEntry for DEFAULT_NAME.
|
// HostEntry.
|
||||||
HostEntry defaults = new HostEntry();
|
HostEntry defaults = new HostEntry();
|
||||||
HostEntry current = defaults;
|
HostEntry current = defaults;
|
||||||
entries.add(defaults);
|
entries.add(defaults);
|
||||||
|
@ -309,8 +309,7 @@ private List<String> parseList(String argument) {
|
||||||
* @return the validated and possibly sanitized value
|
* @return the validated and possibly sanitized value
|
||||||
*/
|
*/
|
||||||
protected String validate(String key, String value) {
|
protected String validate(String key, String value) {
|
||||||
if (String.CASE_INSENSITIVE_ORDER.compare(key,
|
if (SshConstants.PREFERRED_AUTHENTICATIONS.equalsIgnoreCase(key)) {
|
||||||
SshConstants.PREFERRED_AUTHENTICATIONS) == 0) {
|
|
||||||
return stripWhitespace(value);
|
return stripWhitespace(value);
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
|
|
Loading…
Reference in New Issue