Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: JRuby 1.7.0.pre1
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
The line in question - https://github.com/jruby/jruby/blob/master/src/org/jruby/runtime/load/LoadServiceResource.java#L80
The getInputStream method of LoadServiceResource, only when constructed with a URL, leaks via a call to resource.openStream().
Because LoadServiceInputStream completely buffers the contents of the InputStream passed to it, you can close the InputStream created from resource.openStream() after constructing the new LoadServiceInputStream. There may be a better solution, but we've been using this workaround in a custom NonLeakingLoadServiceResource in TorqueBox for several months and it seems to work fine.