[shrinkwrap-issues] [JBoss JIRA] (SHRINKWRAP-511) ArchiveFactory fails to close ZipFile and retains a Windows file lock
Andy Gumbrecht (JIRA)
issues at jboss.org
Thu Jan 26 13:16:00 EST 2017
[ https://issues.jboss.org/browse/SHRINKWRAP-511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13354103#comment-13354103 ]
Andy Gumbrecht commented on SHRINKWRAP-511:
-------------------------------------------
Please take a look at org.jboss.shrinkwrap.impl.base.asset.ZipFileEntryAsset vs org.wildfly.swarm.tools.ZipFileHeaderAsset
*ZipFileHeaderAsset* has return zipFile.getInputStream(fileHeader); <-- This is the culprit. zipFile never gets closed.
*ZipFileEntryAsset* wraps both the stream and file. When the stream is closed, so is the file.
I think you'll find that net.lingala.zip4j.core.ZipFile is not required if you make that change.
> ArchiveFactory fails to close ZipFile and retains a Windows file lock
> ---------------------------------------------------------------------
>
> Key: SHRINKWRAP-511
> URL: https://issues.jboss.org/browse/SHRINKWRAP-511
> Project: ShrinkWrap
> Issue Type: Bug
> Components: api
> Affects Versions: 1.2.6
> Environment: Windows only - All versions
> Reporter: Andy Gumbrecht
> Fix For: 1.2.7
>
>
> org/jboss/shrinkwrap/api/ArchiveFactory.java:187
> The ZipFile is never closed and results in a file lock on Windows only platforms.
> https://github.com/shrinkwrap/shrinkwrap/pull/102
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the shrinkwrap-issues
mailing list