commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1517984 - /commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPSender.java
Date Tue, 27 Aug 2013 20:58:00 GMT
Author: sebb
Date: Tue Aug 27 20:58:00 2013
New Revision: 1517984

URL: http://svn.apache.org/r1517984
Log:
IOException(String, Throwable) is Java 1.6+

Modified:
    commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPSender.java

Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPSender.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPSender.java?rev=1517984&r1=1517983&r2=1517984&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPSender.java
(original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPSender.java
Tue Aug 27 20:58:00 2013
@@ -130,7 +130,10 @@ public class LateralTCPSender
                 {
                     socket.close();
                 }
-                throw new IOException( "Cannot connect to " + host + ":" + port, ioe );
+                // Java 1.6+ only throw new IOException( "Cannot connect to " + host + ":"
+ port, ioe );
+                final IOException ioException = new IOException( "Cannot connect to " + host
+ ":" + port);
+                ioException.initCause(ioe);
+                throw ioException;
             }
 
             socket.setSoTimeout( tcpLateralCacheAttributes.getSocketTimeOut() );



Mime
View raw message