commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marek Zawirski (JIRA)" <>
Subject [jira] Commented: (VFS-253) AbstractFileObject: wrong synchronization of content-related code
Date Thu, 07 May 2009 13:32:30 GMT


Marek Zawirski commented on VFS-253:

{{DefaultFileContent}} seems to be designed to work with ThreadLocal instances, but have some
methods dealing with global state, like {{isOpenGlobal()}}. Iif it gonna be closed globally
it probably miss some {{closeGlobal()}} method or it should be closed only for calling thread
in {{AbstractFileObject#close()}}.

> AbstractFileObject: wrong synchronization of content-related code
> -----------------------------------------------------------------
>                 Key: VFS-253
>                 URL:
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Marek Zawirski
> Creating content through {{AbstractFileObject#getContent()}} and {{DefaultFileContent}}
itself seem to be synchronized, but closing the content by {{AbstractFileObject#close()}}
and checking whether it is open, by {{AbstractFileObject#isContentOpen()}} are NOT synchronized.
> Both these methods miss some lock-object. For {{close()}} it may result in severe race
condition in case of {{FileObject}} shared across more than one thread.
> BTW, thead-safeness of important VFS classes/interfaces like {{FileObject}} is not documented
in javadoc.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message