Skip to content

[IO-554] fixed: prevent input stream close#49

Closed
mmariotti wants to merge 3 commits into
apache:masterfrom
mmariotti:patch-1
Closed

[IO-554] fixed: prevent input stream close#49
mmariotti wants to merge 3 commits into
apache:masterfrom
mmariotti:patch-1

Conversation

@mmariotti

Copy link
Copy Markdown

[IO-554] FileUtils.copyToFile(InputStream source, File destination) closes input stream.
Fixed removing 'source' from try-with-resources.

[IO-554] FileUtils.copyToFile(InputStream source, File destination) closes input stream.
Fixed removing 'source' from try-with-resources.
@coveralls

coveralls commented Nov 5, 2017

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.002%) to 90.052% when pulling 7fd4df3 on mmariotti:patch-1 into fdcc71d on apache:master.

@coveralls

coveralls commented Nov 5, 2017

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.002%) to 90.052% when pulling 67ba564 on mmariotti:patch-1 into fdcc71d on apache:master.

@jochenw

jochenw commented Nov 5, 2017

Copy link
Copy Markdown
Contributor

For the sake of binary compatibility, I'd suggest an alternate proposal:

  • Change the Javadocs of FileUtils.copyToFile to reflect the current situation.

  • Introduce a new method copyToFile(InputStream, File, boolean), which is basically doing the same than the old implementation, except that the last parameter decides upon closing, or not.

@asfgit asfgit closed this in c6b8a38 Jun 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants