-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[VFS-683] Class loader thread safety #367
Conversation
ivakegg
commented
Jan 13, 2023
- To ensure that the closing of files does not interfere with
- reading the content, the FileObjectUtils read methods must
- be synchronized on the underlying filesystem just like the
- close AbstractFileObject close and detach methods.
- Added a test case that demostrated the issue.
7a3bed6
to
185c16c
Compare
commons-vfs2/src/main/java/org/apache/commons/vfs2/util/FileObjectUtils.java
Outdated
Show resolved
Hide resolved
commons-vfs2/src/main/java/org/apache/commons/vfs2/util/FileObjectUtils.java
Outdated
Show resolved
Hide resolved
commons-vfs2/src/main/java/org/apache/commons/vfs2/util/FileObjectUtils.java
Outdated
Show resolved
Hide resolved
commons-vfs2/src/main/java/org/apache/commons/vfs2/util/FileObjectUtils.java
Outdated
Show resolved
Hide resolved
commons-vfs2/src/test/java/org/apache/commons/vfs2/impl/VfsClassLoaderTests.java
Outdated
Show resolved
Hide resolved
commons-vfs2/src/test/java/org/apache/commons/vfs2/impl/VfsClassLoaderTests.java
Outdated
Show resolved
Hide resolved
commons-vfs2/src/test/java/org/apache/commons/vfs2/impl/VfsClassLoaderTests.java
Outdated
Show resolved
Hide resolved
commons-vfs2/src/test/java/org/apache/commons/vfs2/impl/VfsClassLoaderTests.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build is quite possibly failing randomly because of this PR... maybe.
I will try to track down the fails in the macos vms. I will have to instrument the test case to see what is going on. |
Well, everything appears to have passed this time. I will up the number of threads in the test to see if I can force the failures again. |
* To ensure that the closing of files does not interfere with * reading the content, the FileObjectUtils read methods must * be synchronized on the underlying filesystem just like the * close AbstractFileObject close and detach methods. * Added a test case that demostrated the issue.
clear that out, possibly which the getHeadMethod is being called.
This is ready for a final review. I can squash the commits into one when you are ready. |