boris-petrov commented on pull request #155: URL: https://github.com/apache/commons-vfs/pull/155#issuecomment-796717656
I'm not really familiar with the code, but looking through it I see a few funny things. `FileContentThreadData` is explicitly [marked in a comment](https://github.com/apache/commons-vfs/blob/rel/commons-vfs-2.8.0/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/FileContentThreadData.java#L26) that the data it holds should be for a single thread only. It [says the same](https://github.com/apache/commons-vfs/blob/rel/commons-vfs-2.8.0/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java#L598) for `DefaultFileContent.isOpen`. I don't understand what's the point of that or is there even a point. Implementing a global `isOpen` check for all threads should be trivial enough with some collections which keep track of the open streams and some locking here and there. I can't say if that will be a problem for `LRUFilesCache` but it's definitely going to be better than the current state. @garydgregory what do you think? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
