[
https://issues.apache.org/jira/browse/IO-568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16356834#comment-16356834
]
ASF GitHub Bot commented on IO-568:
-----------------------------------
GitHub user tmortagne opened a pull request:
https://github.com/apache/commons-io/pull/55
IO-568: AutoCloseInputStream crash on reset() when reading the whole stream
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tmortagne/commons-io IO-568
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/commons-io/pull/55.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #55
----
commit 7c042b8d677ee3019de72e7e5c34c4d78d375ef9
Author: Thomas Mortagne <thomas.mortagne@...>
Date: 2018-02-07T10:04:53Z
IO-568: AutoCloseInputStream crash on reset() when reading the whole stream
----
> AutoCloseInputStream crash on reset() when reading the whole stream
> -------------------------------------------------------------------
>
> Key: IO-568
> URL: https://issues.apache.org/jira/browse/IO-568
> Project: Commons IO
> Issue Type: Bug
> Components: Streams/Writers
> Affects Versions: 2.6
> Reporter: Thomas Mortagne
> Priority: Minor
> Fix For: 2.7
>
>
> If the the inputstream support mark it should switch back from
> ClosedInputStream to initial InputStream and call reset on it.
> To reproduce:
> {code}
> AutoCloseInputStream stream = new AutoCloseInputStream(new
> ByteArrayInputStream("toto".getBytes()));
> stream.mark("toto".length());
> while (stream.read(new byte[1]) != -1);
> stream.reset();
> {code}
> Among other things it's causing TIKA-2395.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)