Gerrit Telkamp created SSHD-274:
-----------------------------------

             Summary: SshClient: Sample code in JavaDoc is outdated
                 Key: SSHD-274
                 URL: https://issues.apache.org/jira/browse/SSHD-274
             Project: MINA SSHD
          Issue Type: Bug
            Reporter: Gerrit Telkamp
            Priority: Minor


The sample code in teh JavaDoc section of org/apache/sshd/SshClient.java (line 
104...) generates compilation errors.

Please find the diff below:
@@ -105,7 +105,7 @@
  *    SshClient client = SshClient.setUpDefaultClient();
  *    client.start();
  *    try {
- *        ClientSession session = client.connect(host, port);
+ *        ClientSession session = client.connect(host, 
port).await().getSession();
  *
  *        int ret = ClientSession.WAIT_AUTH;
  *        while ((ret & ClientSession.WAIT_AUTH) != 0) {
@@ -125,7 +125,7 @@
  *        channel.setErr(new NoCloseOutputStream(System.err));
  *        channel.open();
  *        channel.waitFor(ClientChannel.CLOSED, 0);
- *        session.close();
+ *        session.close(false);
  *    } finally {
  *        client.stop();
  *    }




--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to