You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Stefan Bodewig <bo...@apache.org> on 2011/07/23 05:23:18 UTC

[compress] Closing Streams and System.in (COMPRESS-128)

Hi,

for reference <https://issues.apache.org/jira/browse/COMPRESS-128>

The bzip2 inputstream checks whether its wrapped input stream is
System.in before closing it.  Do we want to add the same behavior to all
other implementations or do we want to remove it from the bzip2 one and
leave it to the user to wrap System.in in a NoCloseStream of some sort
herself?

Stefan

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


Re: [compress] Closing Streams and System.in (COMPRESS-128)

Posted by Stefan Bodewig <bo...@apache.org>.
On 2011-07-23, sebb wrote:

> On 23 July 2011 12:45, Stefan Bodewig <bo...@apache.org> wrote:
>> On 2011-07-23, Simone Tripodi wrote:

>>> I personally like more the NoCloseStream approach, it would help
>>> avoiding code redundancies (having the Sysout check pattern repeated
>>> doesn't look nice IMHO)

>> Yes, that would be my preference as well.

> Fine by me.

OK.

> It would be a change in behaviour for bzip2, so would need to be
> highlighted in the Javadoc and release notes.

> Perhaps the change should be left to 2.0?

Likely.  I've just seen TarBuffer checks for System.in as well, so it
may be better to change that in one concerted effort later (and close
COMPRESS-128 as WONTFIX).

Stefan

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


Re: [compress] Closing Streams and System.in (COMPRESS-128)

Posted by sebb <se...@gmail.com>.
On 23 July 2011 12:45, Stefan Bodewig <bo...@apache.org> wrote:
> On 2011-07-23, Simone Tripodi wrote:
>
>> I personally like more the NoCloseStream approach, it would help
>> avoiding code redundancies (having the Sysout check pattern repeated
>> doesn't look nice IMHO)
>
> Yes, that would be my preference as well.

Fine by me.

It would be a change in behaviour for bzip2, so would need to be
highlighted in the Javadoc and release notes.

Perhaps the change should be left to 2.0?
It does no harm currently.

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

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


Re: [compress] Closing Streams and System.in (COMPRESS-128)

Posted by Stefan Bodewig <bo...@apache.org>.
On 2011-07-23, Simone Tripodi wrote:

> I personally like more the NoCloseStream approach, it would help
> avoiding code redundancies (having the Sysout check pattern repeated
> doesn't look nice IMHO)

Yes, that would be my preference as well.

Stefan

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


Re: [compress] Closing Streams and System.in (COMPRESS-128)

Posted by Simone Tripodi <si...@apache.org>.
Hallo Stefan,
I personally like more the NoCloseStream approach, it would help
avoiding code redundancies (having the Sysout check pattern repeated
doesn't look nice IMHO)
HTH, have a nice day, all the best!
Simo

http://people.apache.org/~simonetripodi/
http://www.99soft.org/



On Sat, Jul 23, 2011 at 5:23 AM, Stefan Bodewig <bo...@apache.org> wrote:
> Hi,
>
> for reference <https://issues.apache.org/jira/browse/COMPRESS-128>
>
> The bzip2 inputstream checks whether its wrapped input stream is
> System.in before closing it.  Do we want to add the same behavior to all
> other implementations or do we want to remove it from the bzip2 one and
> leave it to the user to wrap System.in in a NoCloseStream of some sort
> herself?
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

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