cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1506577 - /cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
Date Wed, 24 Jul 2013 14:34:43 GMT
Author: sergeyb
Date: Wed Jul 24 14:34:43 2013
New Revision: 1506577

URL: http://svn.apache.org/r1506577
Log:
[CXF-5144] Closing InputStream after read when possible

Modified:
    cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java

Modified: cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java?rev=1506577&r1=1506576&r2=1506577&view=diff
==============================================================================
--- cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java (original)
+++ cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java Wed
Jul 24 14:34:43 2013
@@ -512,6 +512,14 @@ public abstract class AbstractClient imp
                                                             responseMessage);
             } catch (Exception ex) {
                 reportMessageHandlerProblem("MSG_READER_PROBLEM", cls, contentType, ex, r);
+            } finally {
+                if (cls != InputStream.class && inputStream != null) {
+                    try {
+                        inputStream.close();
+                    } catch (IOException ex) { 
+                        // ignore
+                    }
+                }
             }
         } else {
             reportMessageHandlerProblem("NO_MSG_READER", cls, contentType, null, r);



Mime
View raw message