Index: java/org/apache/commons/httpclient/HttpMethodBase.java =================================================================== RCS file: /home/cvspublic/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java,v retrieving revision 1.117 diff -u -r1.117 HttpMethodBase.java --- java/org/apache/commons/httpclient/HttpMethodBase.java 25 Feb 2003 23:20:23 -0000 1.117 +++ java/org/apache/commons/httpclient/HttpMethodBase.java 27 Feb 2003 18:06:16 -0000 @@ -1852,7 +1852,15 @@ // close the underlying stream as soon as it is consumed, and notify // the watcher that the stream has been consumed. if (result != null) { - result = new AutoCloseInputStream(result, responseWatcher); + + result = new AutoCloseInputStream( + result, + new ResponseConsumedWatcher() { + public void responseConsumed() { + responseBodyConsumed(); + } + } + ); } return result; @@ -2482,16 +2490,6 @@ responseConnection = null; } } - - /** - * This exists so that the public interface to this class need not include - * either the responseConsumed or the responseBodyConsumed methods. - */ - private ResponseConsumedWatcher responseWatcher = new ResponseConsumedWatcher() { - public void responseConsumed() { - responseBodyConsumed(); - } - }; /** * Returns the hostConfiguration.