gnodet commented on pull request #152:
URL: https://github.com/apache/mina-sshd/pull/152#issuecomment-665548162
> The reason for this is probably that `AbstractSshFuture.verifyResult()`
re-throws the original `IOException`. It would be more useful if that always
threw a new `IOException` with the original as cause. At least for any future
that is handed out to client code.
```
diff --git
a/sshd-common/src/main/java/org/apache/sshd/common/future/AbstractSshFuture.java
b/sshd-common/src/main/java/org/apache/sshd/common/future/AbstractSshFuture.java
index 48ab284e..c64bd7fb 100644
---
a/sshd-common/src/main/java/org/apache/sshd/common/future/AbstractSshFuture.java
+++
b/sshd-common/src/main/java/org/apache/sshd/common/future/AbstractSshFuture.java
@@ -131,15 +131,6 @@ public abstract class AbstractSshFuture<T extends
SshFuture> extends AbstractLog
if (Throwable.class.isAssignableFrom(actualType)) {
Throwable t = GenericUtils.peelException((Throwable) value);
- if (t != value) {
- value = t;
- actualType = value.getClass();
- }
-
- if (IOException.class.isAssignableFrom(actualType)) {
- throw (IOException) value;
- }
-
Throwable cause = GenericUtils.resolveExceptionCause(t);
throw formatExceptionMessage(
msg -> new SshException(msg, cause),
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]