commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Damjan Jovanovic (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SANSELAN-63) Faulty image will be locked on the file system
Date Sat, 18 Feb 2012 07:01:59 GMT

    [ https://issues.apache.org/jira/browse/SANSELAN-63?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13210853#comment-13210853
] 

Damjan Jovanovic commented on SANSELAN-63:
------------------------------------------

This probably happens because BmpImageParser.getImageInfo() calls byteSource.getInputStream()
and never closes it, thus leaking that InputStream.

It's easy to fix with a try/finally around that one line of code, but the entire project should
be audited for such leaks.

                
> Faulty image will be locked on the file system
> ----------------------------------------------
>
>                 Key: SANSELAN-63
>                 URL: https://issues.apache.org/jira/browse/SANSELAN-63
>             Project: Commons Sanselan
>          Issue Type: Bug
>    Affects Versions: 0.97
>         Environment: Windows 7, Java 1.7.0.1, 0.97-Incubator
>            Reporter: Adrian Moerchen
>         Attachments: 380440_295155317172029_185275861493309_985773_37867068_n.bmp
>
>
> The attached image is somehow corrupt (it still can be opened with IrfanView).
> Trying to read the image information with {{Sanselan.getImageInfo(file)}} results in
an IOException.
> After this the image is still locked on the file system, and can't be deleted for example.
I expected it to be immediately get unlocked on the file system, after the error occured.

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

        

Mime
View raw message