This is an automated email from the ASF dual-hosted git repository.

bodewig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git


The following commit(s) were added to refs/heads/master by this push:
     new f891c4b  config may return null-hostname for wildcard configs
f891c4b is described below

commit f891c4bd8b5acf92f79a49734cffda23cb19959f
Author: Stefan Bodewig <[email protected]>
AuthorDate: Sun Aug 23 12:24:01 2020 +0200

    config may return null-hostname for wildcard configs
---
 src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java 
b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java
index edee9a8..4987d05 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java
@@ -277,7 +277,9 @@ public abstract class SSHBase extends Task implements 
LogListener {
                 throw new BuildException("Failed to load the SSH configuration 
file " + sshConfig, e);
             }
             
-            host = config.getHostname();
+            if (config.getHostname() != null) {
+                host = config.getHostname();
+            }
             
             if (userInfo.getName() == null) {
                 userInfo.setName(config.getUser());

Reply via email to