Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-beta-10
-
None
-
groovy-1.0-beta 10 on Linux
Description
It appears that generating a class using GroovyClassLoader.parseClass(File) has the side effect of opening a stream on that file that is never closed. The result of this under load can be an exception (Too Many Files Open) on Linux - may affect other OSes.
In contrast and as a workaround, creating a FileInputStream on the file, invoking GroovyClassLoader.parseClass(InputStream, String(File.getAbsolutePath())), and subsequently closing the stream does not appear to have any ill side effects.
My test case was roughly 5 instances of an application which uses 95 generated classes per instance on SUSE 9.0.