You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by GitBox <gi...@apache.org> on 2020/07/29 17:36:56 UTC

[GitHub] [mina-sshd] gnodet commented on pull request #152: ProxyTest with HostKeyVerification

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org