hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Odd comment for deprecated consumeContent() method
Date Wed, 22 Sep 2010 16:30:26 GMT
On Wed, 2010-09-22 at 17:26 +0100, sebb wrote:
> On 22 September 2010 17:13, sebb <sebbaz@gmail.com> wrote:
> > On 22 September 2010 16:29, Oleg Kalnichevski <olegk@apache.org> wrote:
> >> On Tue, 2010-09-21 at 23:23 +0100, sebb wrote:
> >>> The comments added for the @deprecated tags in
> >>>
> >>> r932551 - Deprecated HttpEntity#consumeContent in favor of a more
> >>> standard InputStream#close contract
> >>>
> >>> do not seem to make sense.
> >>>
> >>
> >> Sebastian, if the comment is unclear or ambiguous please do feel free to
> >> rephrase it. The idea is that one needs to do one of two things to
> >> ensure proper deallocation of resources associated with a HTTP entity:
> >> either call HttpEntity#writeOut() or call InputStream#close() on the
> >
> > s/writeOut/writeTo/
> >
> >> object returned by HttpEntity#getContent()
> >
> > OK, will update the Javadoc.
> >
> > One other oddity - the AbstractHttpEntity implementation throws
> > UnsupportedOperationException, whereas none of the others do.
> >
> > Is that intended? If not, then EntityTemplate does not need to override it.
> >
> 
> Also InputStreamEntity.consumeContent() overrides the deprecated
> method but is not itself deprecated?
> 

Should be deprecated.

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message