diff --git a/WHATSNEW b/WHATSNEW index 29075af2d..26c0871e8 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -159,9 +159,11 @@ Fixed bugs: causing impossibility to process XML entities referenced by XML documents in non ASCII paths. Bugzilla report 37348. +* > 1 ssh invocations to a given host would fail. Bugzilla report 36207. + Other changes: -------------- -* Fixed references to obsoleted CVS web site. Burzilla Report 36854. +* Fixed references to obsoleted CVS web site. Bugzilla Report 36854. * Log fine-grained events at verbose level from JUnit. Bugzilla report 31885. diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHUserInfo.java b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHUserInfo.java index 857d6e212..363c77269 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHUserInfo.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHUserInfo.java @@ -29,7 +29,6 @@ public class SSHUserInfo implements UserInfo, UIKeyboardInteractive { private String password = null; private String keyfile; private String passphrase = null; - private boolean firstTime = true; private boolean trustAllCertificates; /** Constructor for SSHUserInfo. */ @@ -154,9 +153,8 @@ public class SSHUserInfo implements UserInfo, UIKeyboardInteractive { this.keyfile = keyfile; } - // (NOTE: this method does not seem to be called /** - * Whether to prompt for a passphase. + * Implement the UserInfo interface. * @param message ignored * @return true always */ @@ -164,35 +162,27 @@ public class SSHUserInfo implements UserInfo, UIKeyboardInteractive { return true; } - // (NOTE: this method does not seem to be called /** - * Whether to prompt for a password. + * Implement the UserInfo interface. * @param passwordPrompt ignored * @return true the first time this is called, false otherwise */ public boolean promptPassword(String passwordPrompt) { - //log(passwordPrompt, Project.MSG_DEBUG); - if (firstTime) { - firstTime = false; - return true; - } - return firstTime; + return true; } - // (NOTE: this method does not seem to be called /** - * Whether to prompt yes or no. + * Implement the UserInfo interface. * @param message ignored * @return the value of trustAllCertificates */ public boolean promptYesNo(String message) { - //log(prompt, Project.MSG_DEBUG); return trustAllCertificates; } - // (NOTE: this method does not seem to be called +//why do we do nothing? /** - * Do nothing. + * Implement the UserInfo interface (noop). * @param message ignored */ public void showMessage(String message) {