hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 37445] - Part.isRepeatable() should be abstract
Date Thu, 10 Nov 2005 15:22:40 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37445>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37445





------- Additional Comments From loic.peron@bigfoot.com  2005-11-10 16:22 -------
(In reply to comment #2)
> Even though Part.isRepeatable() is not abstract you can still override it, can't
> you?

Yes I can, but it would require to subclass FilePart just to override
isRepeatable(), whereas is it is delegated to PartSource, I would just have to
return the correct value for my createInputStream implementation.

For now (3.0) I will try to make my PartSource repeatable (ie able to create new
InputStream on demand) but I cannot assure I will be able to. In such case, I
will have to implement my non-repeatable in two separate location, half in my
FilePart subclass (isRepeatable), half in my PartSource implementation
(createInputStream).

The interface change is only really needed in PartSource, adding the
isRepeatable() method. FilePart can (for now) override isRepeatable() to
delegate it to its PartSource. But Part.isRepeatable() should be abstract, as is
sendData(), to indicate to any Part implementation that both must be concordant.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message