Author: markt
Date: Sat Oct  3 18:05:28 2009
New Revision: 821381

URL: http://svn.apache.org/viewvc?rev=821381&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47499
Don't swallow BindException

Modified:
    tomcat/tc6.0.x/trunk/STATUS.txt
    tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
    tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java
    tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=821381&r1=821380&r2=821381&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Sat Oct  3 18:05:28 2009
@@ -311,12 +311,6 @@
   the installer, leaving the one in the ROOT webapp as is. Note, that we
   already have these two copies of the file in our zip/tgz distributions.
 
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47499
-  Don't swallow BindException
-  https://issues.apache.org/bugzilla/attachment.cgi?id=24302
-  +1: markt, rjung, kkolinko
-  -1: 
-
 * Fix cluster replication problem: session expiration uses a replication
   shortcut, so that attributes changed immediately before invalidation do
   not get replicated before the expiration replication message.

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java?rev=821381&r1=821380&r2=821381&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java Sat 
Oct  3 18:05:28 2009
@@ -522,12 +522,16 @@
                 } else {
                     serverSocket = serverSocketFactory.createSocket(port, 
backlog, address);
                 }
-            } catch (BindException be) {
+            } catch (BindException orig) {
+                String msg;
                 if (address == null)
-                    throw new BindException(be.getMessage() + "<null>:" + 
port);
+                    msg = orig.getMessage() + " <null>:" + port;
                 else
-                    throw new BindException(be.getMessage() + " " +
-                            address.toString() + ":" + port);
+                    msg = orig.getMessage() + " " +
+                            address.toString() + ":" + port;
+                BindException be = new BindException(msg);
+                be.initCause(orig);
+                throw be;
             }
         }
         //if( serverTimeout >= 0 )

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java?rev=821381&r1=821380&r2=821381&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java 
Sat Oct  3 18:05:28 2009
@@ -294,8 +294,16 @@
                     } else {
                         serverSocket = factory.createSocket(port, backlog, 
inet);
                     }
-                } catch ( BindException be ) {
-                    throw new BindException(be.getMessage() + ":" + port);
+                } catch (BindException orig) {
+                    String msg;
+                    if (inet == null)
+                        msg = orig.getMessage() + "<null>:" + port;
+                    else
+                        msg = orig.getMessage() + " " +
+                                inet.toString() + ":" + port;
+                    BindException be = new BindException(msg);
+                    be.initCause(orig);
+                    throw be;
                 }
             }
             if( serverTimeout >= 0 )

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=821381&r1=821380&r2=821381&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Sat Oct  3 18:05:28 2009
@@ -212,12 +212,15 @@
         certificate chains. Patch by Patrik Schnellmann. (markt)
       </fix>
       <fix>
+        <bug>46985</bug>: Clean up code and remove impossible condition.
+        (markt/kkolinko)
+      </fix>
+      <fix>
         <bug>47225</bug>: Fix error in calculation of a buffer length in the
         mapper. (markt)
       </fix>
       <fix>
-        <bug>46985</bug>: Clean up code and remove impossible condition.
-        (markt/kkolinko)
+        <bug>47499</bug>: Don't swallow bind exceptions. (markt)
       </fix>
     </changelog>
   </subsection>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to