Author: dkulp
Date: Mon Jun 16 13:50:36 2008
New Revision: 668299
URL: http://svn.apache.org/viewvc?rev=668299&view=rev
Log:
Merged revisions 668252 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r668252 | dkulp | 2008-06-16 13:46:12 -0400 (Mon, 16 Jun 2008) | 2 lines
[CXF-1609] Fix how the longs are cast down to ints
........
Modified:
cxf/branches/2.0.x-fixes/ (props changed)
cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Propchange: cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=668299&r1=668298&r2=668299&view=diff
==============================================================================
---
cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
(original)
+++
cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Mon Jun 16 13:50:36 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