Fix bug 44558. Include address in bind exception message.
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 9 Mar 2008 17:31:48 +0000 (17:31 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 9 Mar 2008 17:31:48 +0000 (17:31 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@635304 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/tomcat/util/net/JIoEndpoint.java

index eac333e..afc0f56 100644 (file)
@@ -498,7 +498,11 @@ public class JIoEndpoint {
                     serverSocket = serverSocketFactory.createSocket(port, backlog, address);
                 }
             } catch (BindException be) {
-                throw new BindException(be.getMessage() + ":" + port);
+                if (address == null)
+                    throw new BindException(be.getMessage() + "<null>:" + port);
+                else
+                    throw new BindException(be.getMessage() + " " +
+                            address.toString() + ":" + port);
             }
         }
         //if( serverTimeout >= 0 )