[jira] Commented: (VFS-324) RamFileSystem.close() should clear the cache rather than nulling it

2010-11-02 Thread Sebb (JIRA)

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

Sebb commented on VFS-324:
--

Fix looks OK, but I agree that the code is not thread-safe under all calling 
sequences. But at least the class data will be consistent across threads.

The parent classes aren't thread-safe either, and have data publication 
problems.

> RamFileSystem.close() should clear the cache rather than nulling it
> ---
>
> Key: VFS-324
> URL: https://issues.apache.org/jira/browse/VFS-324
> Project: Commons VFS
>  Issue Type: Bug
>Reporter: Sebb
> Fix For: 2.0
>
>
> RamFileSystem.close() should probably clear the cache rather than nulling it.
> This would allow the field to be made final, as well as avoiding an NPE if 
> any methods using the cache are invoked after close.
> Making the field final would ensure it was published correctly - at present 
> the class is not thread-safe

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



[jira] Commented: (VFS-324) RamFileSystem.close() should clear the cache rather than nulling it

2010-11-01 Thread Ralph Goers (JIRA)

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

Ralph Goers commented on VFS-324:
-

I've applied that change but also noticed that the collection wasn't 
synchronized while iterating over it. I also noticed the same problems occur in 
RamFileData so addressed them there as well. However, I'm still not sure this 
code is completely thread safe.

> RamFileSystem.close() should clear the cache rather than nulling it
> ---
>
> Key: VFS-324
> URL: https://issues.apache.org/jira/browse/VFS-324
> Project: Commons VFS
>  Issue Type: Bug
>Reporter: Sebb
> Fix For: 2.0
>
>
> RamFileSystem.close() should probably clear the cache rather than nulling it.
> This would allow the field to be made final, as well as avoiding an NPE if 
> any methods using the cache are invoked after close.
> Making the field final would ensure it was published correctly - at present 
> the class is not thread-safe

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