commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daryl Odnert (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (VFS-253) AbstractFileObject: wrong synchronization of content-related code
Date Mon, 26 Nov 2018 21:42:00 GMT

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

Daryl Odnert edited comment on VFS-253 at 11/26/18 9:41 PM:
------------------------------------------------------------

I opened a new bug today - VFS-684 - requesting that the API documentation is fixed to identify
requirements for multi-threaded applications.


was (Author: daryl.odnert):
I opened a new bug today requesting that the API documentation is fixed to identify requirements
for multi-threaded applications.

> AbstractFileObject: wrong synchronization of content-related code
> -----------------------------------------------------------------
>
>                 Key: VFS-253
>                 URL: https://issues.apache.org/jira/browse/VFS-253
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Marek Zawirski
>            Priority: Major
>
> 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 was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message