-
Notifications
You must be signed in to change notification settings - Fork 60
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
Make accessFilter file registration thread safe #635
Make accessFilter file registration thread safe #635
Conversation
common/utils/src/main/java/org/graalvm/buildtools/agent/AgentConfiguration.java
Outdated
Show resolved
Hide resolved
common/utils/src/main/java/org/graalvm/buildtools/agent/AgentConfiguration.java
Outdated
Show resolved
Hide resolved
common/utils/src/main/java/org/graalvm/buildtools/agent/AgentConfiguration.java
Outdated
Show resolved
Hide resolved
common/utils/src/main/java/org/graalvm/buildtools/agent/AgentConfiguration.java
Outdated
Show resolved
Hide resolved
common/utils/src/main/java/org/graalvm/buildtools/agent/AgentConfiguration.java
Outdated
Show resolved
Hide resolved
common/utils/src/main/java/org/graalvm/buildtools/agent/AgentConfiguration.java
Outdated
Show resolved
Hide resolved
Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA). To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application. When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated. If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public. |
3ae135b
to
cc19b6d
Compare
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.
- Adjust the logging and error messages before merging.
common/utils/src/main/java/org/graalvm/buildtools/agent/AgentConfiguration.java
Outdated
Show resolved
Hide resolved
common/utils/src/main/java/org/graalvm/buildtools/agent/AgentConfiguration.java
Outdated
Show resolved
Hide resolved
common/utils/src/main/java/org/graalvm/buildtools/agent/AgentConfiguration.java
Outdated
Show resolved
Hide resolved
cc19b6d
to
84b16a3
Compare
This PR should fix #626
Described issue probably occurs in multi-threaded environment because the reported error throws
FileAlreadyExistsException
even though we checked first that file doesn't exist.As per documentation of
java.nio.file.Files#createDirectory
:Since we only care that directory with the given name exists, we can just catch and ignore
FileAlreadyExistsException
in this case.