-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ShadowCopyAction still isn't closing all input streams #408
Comments
This patch below follows the patterns of the file including the change meant to address #364. However, in the case of transform() I would recommend just fixing the innermost transform() implementation and reducing the calling functions. You would not break anything, not lose any clarity, and you would be better protected against future problems. Add a comment if it helps. I wouldn't make the same recommendation for an API method, but in this case you always want the stream closed.
|
Any chance you can submit this as a PR? |
Sure! I'll have it by Tuesday, Monday if I get home on time.
…On Sat, Oct 6, 2018, 3:43 PM John Engelman ***@***.***> wrote:
Any chance you can submit this as a PR?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#408 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAgOUP3VdNknaK_khcoVlct0jKwEPAvWks5uiRX1gaJpZM4XEpl5>
.
|
@johnrengelman all ready to go. |
[Fixes #408] always close input streams we create
Please check the User Guide before submitting "how do I do 'x'?" questions!
Shadow Version
2.0.4, 4.0.1
Gradle Version
4.10
Expected Behavior
Everyplace the code is calling archive.getInputStream or otherwise opening a stream should be closed. For example, copyArchiveEntry should close the inputStream from archive.getInputStream as IOUtils.copyLarge does not.
Actual Behavior
Our build process runs out of file handles while building our shadow jars.
Gradle Build Script(s)
Content of Shadow JAR (
jar tf <jar file>
- post link to GIST if too long)The text was updated successfully, but these errors were encountered: