[GRADLE-3009] File handle leaks when using AntBuilder (daemon) Created: 29/Jan/14  Updated: 18/Feb/14  Resolved: 18/Feb/14

Status: Resolved
Project: Gradle
Affects Version/s: 1.10
Fix Version/s: 1.12-rc-1

Type: Bug
Reporter: Luke Daley Assignee: Luke Daley
Resolution: Fixed Votes: 0


Ant internally uses an AntClassLoader. It keeps a cache of File → JarFile (AntClassLoader#jarFiles). This cache holds open JarFile objects. This cache is designed to be open for the duration of the build, and then closed at the end. The problem is that we never tell Ant that the build has finished and therefore it never closes this cache.

To remedy this, we need to make sure we call fireBuildFinished() on all ant Project instances when the build is over.

Generated at Wed Jun 30 12:37:26 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.