tomaswolf commented on code in PR #916:
URL: https://github.com/apache/mina-sshd/pull/916#discussion_r4107134827
##########
sshd-contrib/src/main/java/org/apache/sshd/contrib/common/io/EndlessWriteFuture.java:
##########
@@ -88,4 +89,19 @@ public boolean isWritten() {
public Throwable getException() {
return null;
}
+
Review Comment:
Missing override of setException(Throwable exception).
##########
sshd-common/src/main/java/org/apache/sshd/common/io/AbstractIoWriteFuture.java:
##########
@@ -24,21 +24,21 @@
import org.apache.sshd.common.SshException;
import org.apache.sshd.common.future.CancelOption;
-import org.apache.sshd.common.future.DefaultVerifiableSshFuture;
+import org.apache.sshd.common.future.DefaultCancellableSshFuture;
/**
* @author <a href="mailto:[email protected]">Apache MINA SSHD Project</a>
*/
public abstract class AbstractIoWriteFuture
- extends DefaultVerifiableSshFuture<IoWriteFuture>
+ extends DefaultCancellableSshFuture<IoWriteFuture>
Review Comment:
This means that PendingWriteFuture now becomes cancellable. If that's
intended, then the override of setException() should probably be removed there.
And likewise in Nio2DefaultIoWriteFuture.
##########
sshd-common/src/main/java/org/apache/sshd/common/io/IoWriteFuture.java:
##########
@@ -18,11 +18,13 @@
*/
package org.apache.sshd.common.io;
+import org.apache.sshd.common.future.Cancellable;
import org.apache.sshd.common.future.HasException;
import org.apache.sshd.common.future.SshFuture;
import org.apache.sshd.common.future.VerifiableFuture;
-public interface IoWriteFuture extends HasException, SshFuture<IoWriteFuture>,
VerifiableFuture<IoWriteFuture> {
+public interface IoWriteFuture
+ extends HasException, Cancellable, SshFuture<IoWriteFuture>,
VerifiableFuture<IoWriteFuture> {
Review Comment:
A cancellable IoWriteFuture also means that you have to think about what
should happen in Nio2Session when the future returned for a newly queued buffer
is canceled. And then check that all callers of IoSession.write() can deal in
some reasonable way with a canceled write.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]