You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by jo...@apache.org on 2020/05/08 16:43:31 UTC

[mina] branch bugfix/DIRMINA-1126 updated: Fix for binding exception inheritance

This is an automated email from the ASF dual-hosted git repository.

johnnyv pushed a commit to branch bugfix/DIRMINA-1126
in repository https://gitbox.apache.org/repos/asf/mina.git


The following commit(s) were added to refs/heads/bugfix/DIRMINA-1126 by this push:
     new 54597ed  Fix for binding exception inheritance
54597ed is described below

commit 54597ed0acdc2ccebc87d05a0f7356275776df7b
Author: johnnyv <jo...@apache.org>
AuthorDate: Fri May 8 12:32:12 2020 -0400

    Fix for binding exception inheritance
---
 .../org/apache/mina/transport/socket/nio/NioSocketAcceptor.java     | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/mina-core/src/main/java/org/apache/mina/transport/socket/nio/NioSocketAcceptor.java b/mina-core/src/main/java/org/apache/mina/transport/socket/nio/NioSocketAcceptor.java
index 5090d78..dc9e302 100644
--- a/mina-core/src/main/java/org/apache/mina/transport/socket/nio/NioSocketAcceptor.java
+++ b/mina-core/src/main/java/org/apache/mina/transport/socket/nio/NioSocketAcceptor.java
@@ -266,10 +266,8 @@ implements SocketAcceptor {
             } catch (IOException ioe) {
                 // Add some info regarding the address we try to bind to the
                 // message
-                String newMessage = "Error while binding on " + localAddress + "\n" + "original message : "
-                        + ioe.getMessage();
-                Exception e = new IOException(newMessage);
-                e.initCause(ioe.getCause());
+                String newMessage = "Error while binding on " + localAddress;
+                Exception e = new IOException(newMessage, ioe);
 
                 // And close the channel
                 channel.close();