Ben Browning created JRUBY-6611:
-----------------------------------

             Summary: LoadServiceResource Opens But Never Closes InputStreams 
When Constructed With a URL
                 Key: JRUBY-6611
                 URL: https://jira.codehaus.org/browse/JRUBY-6611
             Project: JRuby
          Issue Type: Bug
            Reporter: Ben Browning
            Assignee: Thomas E Enebo


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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to