You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by lg...@apache.org on 2018/11/16 17:14:43 UTC

[2/2] mina-sshd git commit: [SSHD-867] HostConfigEntry#getProperty may return null even if defaultValue != null

[SSHD-867] HostConfigEntry#getProperty may return null even if defaultValue != null


Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/01fc9fec
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/01fc9fec
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/01fc9fec

Branch: refs/heads/master
Commit: 01fc9fec8d9790767b5def1f6aad21922a25ba29
Parents: 750afe7
Author: Lyor Goldstein <lg...@apache.org>
Authored: Fri Nov 16 17:43:23 2018 +0200
Committer: Lyor Goldstein <lg...@apache.org>
Committed: Fri Nov 16 19:20:22 2018 +0200

----------------------------------------------------------------------
 .../java/org/apache/sshd/client/config/hosts/HostConfigEntry.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/01fc9fec/sshd-common/src/main/java/org/apache/sshd/client/config/hosts/HostConfigEntry.java
----------------------------------------------------------------------
diff --git a/sshd-common/src/main/java/org/apache/sshd/client/config/hosts/HostConfigEntry.java b/sshd-common/src/main/java/org/apache/sshd/client/config/hosts/HostConfigEntry.java
index 90b6549..eafedd8 100644
--- a/sshd-common/src/main/java/org/apache/sshd/client/config/hosts/HostConfigEntry.java
+++ b/sshd-common/src/main/java/org/apache/sshd/client/config/hosts/HostConfigEntry.java
@@ -283,7 +283,7 @@ public class HostConfigEntry extends HostPatternsHolder implements MutableUserHo
         String key = ValidateUtils.checkNotNullAndNotEmpty(name, "No property name");
         Map<String, String> props = getProperties();
         if (GenericUtils.isEmpty(props)) {
-            return null;
+            return defaultValue;
         }
 
         String value = props.get(key);