[
https://issues.apache.org/jira/browse/SSHD-274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Guillaume Nodet resolved SSHD-274.
----------------------------------
Resolution: Fixed
Fix Version/s: 0.10.0
Assignee: Guillaume Nodet
Fixed in
https://git-wip-us.apache.org/repos/asf?p=mina-sshd.git;a=commitdiff;h=28807d49f2f2501cec46302835539268562c22f6
Thx for reporting !
> 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
> Assignee: Guillaume Nodet
> Priority: Minor
> Fix For: 0.10.0
>
>
> 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)