[ 
https://issues.apache.org/jira/browse/IO-191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665997#action_12665997
 ] 

Sebb commented on IO-191:
-------------------------

I agree with all Jukka's comments, except for making collections immutable.

Where the Collections are private - as in AndFileFilter for example - making 
the item immutable improves thread safety, because the fields are then properly 
published.
If there is a chance for concurrent access, then the class can and should 
protect the caller.  
If one thread creates a new collection whilst another is iterating it, then in 
the absence of synchronisation there is no guarantee what state the other 
thread will next see for the collection.

> Possible improvements using static analysis.
> --------------------------------------------
>
>                 Key: IO-191
>                 URL: https://issues.apache.org/jira/browse/IO-191
>             Project: Commons IO
>          Issue Type: Improvement
>            Reporter: Peter Lawrey
>            Priority: Trivial
>         Attachments: commons-io-static-analysis.patch
>
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>


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

Reply via email to