cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r668252 - /cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Date Mon, 16 Jun 2008 17:46:12 GMT
Author: dkulp
Date: Mon Jun 16 10:46:12 2008
New Revision: 668252

URL: http://svn.apache.org/viewvc?rev=668252&view=rev
Log:
[CXF-1609] Fix how the longs are cast down to ints

Modified:
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=668252&r1=668251&r2=668252&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Mon Jun 16 10:46:12 2008
@@ -484,8 +484,16 @@
         
         //TODO using Message context to decided HTTP send properties 
              
-        connection.setConnectTimeout((int)clientSidePolicy.getConnectionTimeout());
-        connection.setReadTimeout((int)clientSidePolicy.getReceiveTimeout());
+        long timeout = clientSidePolicy.getConnectionTimeout();
+        if (timeout > Integer.MAX_VALUE) {
+            timeout = Integer.MAX_VALUE;
+        }
+        connection.setConnectTimeout((int)timeout);
+        timeout = clientSidePolicy.getReceiveTimeout();
+        if (timeout > Integer.MAX_VALUE) {
+            timeout = Integer.MAX_VALUE;
+        }
+        connection.setReadTimeout((int)timeout);
         connection.setUseCaches(false);
         // We implement redirects in this conduit. We do not
         // rely on the underlying URLConnection implementation



Mime
View raw message