commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mbe...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient HttpConnection.java
Date Mon, 08 Sep 2003 00:37:29 GMT
mbecke      2003/09/07 17:37:29

  Modified:    httpclient/src/java/org/apache/commons/httpclient
                        HttpConnection.java
  Log:
  Switched the order in which socket streams are closed.
  PR: 22941
  Submitted by: Michael Becke
  Reviewed by: Oleg Kalnichevski
  
  Revision  Changes    Path
  1.74      +12 -12    jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java
  
  Index: HttpConnection.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- HttpConnection.java	12 Aug 2003 02:35:17 -0000	1.73
  +++ HttpConnection.java	8 Sep 2003 00:37:29 -0000	1.74
  @@ -1053,24 +1053,24 @@
           // no longer care about previous responses...
           lastResponseInputStream = null;
   
  -        if (null != inputStream) {
  -            InputStream temp = inputStream;
  -            inputStream = null;
  +        if (null != outputStream) {
  +            OutputStream temp = outputStream;
  +            outputStream = null;
               try {
                   temp.close();
               } catch (Exception ex) {
  -                LOG.debug("Exception caught when closing input", ex);
  +                LOG.debug("Exception caught when closing output", ex);
                   // ignored
               }
           }
   
  -        if (null != outputStream) {
  -            OutputStream temp = outputStream;
  -            outputStream = null;
  +        if (null != inputStream) {
  +            InputStream temp = inputStream;
  +            inputStream = null;
               try {
                   temp.close();
               } catch (Exception ex) {
  -                LOG.debug("Exception caught when closing output", ex);
  +                LOG.debug("Exception caught when closing input", ex);
                   // ignored
               }
           }
  
  
  

Mime
View raw message