You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by gn...@apache.org on 2020/05/26 09:28:10 UTC
[mina-sshd] 01/01: Avoid unnecessary cast to AbstractSession
This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mina-sshd.git
commit 35421eba0d46319f2485a6b4054f8821fad7fab4
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Tue May 26 11:27:12 2020 +0200
Avoid unnecessary cast to AbstractSession
---
sshd-core/src/test/java/org/apache/sshd/client/ClientTest.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/sshd-core/src/test/java/org/apache/sshd/client/ClientTest.java b/sshd-core/src/test/java/org/apache/sshd/client/ClientTest.java
index 7812473..1fcc1ef 100644
--- a/sshd-core/src/test/java/org/apache/sshd/client/ClientTest.java
+++ b/sshd-core/src/test/java/org/apache/sshd/client/ClientTest.java
@@ -1412,15 +1412,14 @@ public class ClientTest extends BaseTestSupport {
channel.setErr(err);
channel.open().verify(OPEN_TIMEOUT);
- AbstractSession cs = (AbstractSession) session;
- Buffer buffer = cs.createBuffer(SshConstants.SSH_MSG_DISCONNECT, Integer.SIZE);
+ Buffer buffer = session.createBuffer(SshConstants.SSH_MSG_DISCONNECT, Integer.SIZE);
buffer.putInt(SshConstants.SSH2_DISCONNECT_BY_APPLICATION);
buffer.putString("Cancel");
buffer.putString(""); // TODO add language tag
- IoWriteFuture f = cs.writePacket(buffer);
+ IoWriteFuture f = session.writePacket(buffer);
assertTrue("Packet writing not completed in time", f.await(DEFAULT_TIMEOUT));
- suspend(cs.getIoSession());
+ suspend(session.getIoSession());
TestEchoShell.latch.await();
} finally {