DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32855>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32855

           Summary: Opened input strams are not closed
           Product: Slide
           Version: 2.1
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: WebDAV client
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


The Slide WebDAV client, specifically class WebdavResource, opens input streams 
but doesn't close them. This results in errors if many files are consecutively 
copied with putMethod(). If input streams are not closed, the system resources 
will be freed only at garbage collection time.

I would suggest to change WebdavResource as follows.

Instead of doing 
        method.setRequestBody(new FileInputStream(file));

do

        FileInputStream fin=new FileInputStream(file);
        method.setRequestBody(fin);
        fin.close();

Example stack trace after copying multiple files:

java.io.FileNotFoundException: 
(Insufficient system resources exist to complete the requested service)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(Unknown Source)
        at org.apache.webdav.lib.WebdavResource.putMethod
(WebdavResource.java:2553)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to