You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by el...@apache.org on 2014/09/07 07:01:41 UTC

git commit: Had to intialize the cause outside of the constructor to please Java 5 (no constructor with the message and the cause in Java5)

Repository: mina
Updated Branches:
  refs/heads/2.0 5ffd8c02a -> 67240409a


Had to intialize the cause outside of the constructor to please Java 5
(no constructor with the message and the cause in Java5)

Project: http://git-wip-us.apache.org/repos/asf/mina/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina/commit/67240409
Tree: http://git-wip-us.apache.org/repos/asf/mina/tree/67240409
Diff: http://git-wip-us.apache.org/repos/asf/mina/diff/67240409

Branch: refs/heads/2.0
Commit: 67240409a2537972d6998f26ed83d99265a6de09
Parents: 5ffd8c0
Author: Emmanuel Lécharny <el...@symas.com>
Authored: Sun Sep 7 07:01:23 2014 +0200
Committer: Emmanuel Lécharny <el...@symas.com>
Committed: Sun Sep 7 07:01:23 2014 +0200

----------------------------------------------------------------------
 .../org/apache/mina/transport/socket/nio/NioSocketAcceptor.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mina/blob/67240409/mina-core/src/main/java/org/apache/mina/transport/socket/nio/NioSocketAcceptor.java
----------------------------------------------------------------------
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 22f145b..8e9e333 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
@@ -235,7 +235,9 @@ implements SocketAcceptor {
                 // message
                 String newMessage = "Error while binding on " + localAddress + "\n" + "original message : "
                         + ioe.getMessage();
-                throw new IOException(newMessage, ioe.getCause());
+                Exception e = new IOException(newMessage);
+                e.initCause(ioe.getCause());
+                throw e;
             }
 
             // Register the channel within the selector for ACCEPT event