Uploaded image for project: 'MINA SSHD'
  1. MINA SSHD
  2. SSHD-274

SshClient: Sample code in JavaDoc is outdated

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.10.0
    • None

    Description

      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(); * }

      Attachments

        Activity

          People

            gnodet Guillaume Nodet
            g.telkamp Gerrit Telkamp
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: