-
Notifications
You must be signed in to change notification settings - Fork 123
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
feat(#2375): fix the bug with AccessDenied exception in TranspileMojo #2380
feat(#2375): fix the bug with AccessDenied exception in TranspileMojo #2380
Conversation
…xception on Windows OS
@Graur Could you take a look, please? |
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.
@volodya-lombrozo Seems like a good solution, but there are a couple of questions:
* You can read more about the original problem in the following issue: | ||
* - <a href="https://github.com/objectionary/eo/issues/2370">issue link</a> | ||
* In other words, concurrent file deletions on the Windows OS can lead to an | ||
* {@link java.nio.file.AccessDeniedException}, which could crash the build. |
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.
@volodya-lombrozo What do you think about creating a test case for such an issue? Maybe something like this https://www.yegor256.com/2018/03/27/how-to-test-thread-safety.html
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.
@Graur I'm already spend lots of time for that PR. Can we implement it the next PR? I have added a puzzle for it.
this, | ||
String.format("Can't delete file %s due to access denied", binary) | ||
); | ||
synchronized (TranspileMojo.class) { |
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.
@volodya-lombrozo Did you think about Synchronized Decorators?
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.
@Graur What do you suggest to decorate? We don't have objects here. Or maybe I am missing something?
@Graur Could you have a look one more time, please? |
@Graur reminder |
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.
@volodya-lombrozo Thanks!
@yegor256 Please have a look
@yegor256 Could you merge that changes, please? |
@rultor merge |
Fix the problem with
AccessDeniedException
inTranspileMojo
Closes: #2375, #2370
PR-Codex overview
Detailed summary
java.nio.file.AccessDeniedException
inTranspileMojo.java
.AccessDeniedException
when deleting files on Windows OS in thecleanUpClasses
method.AccessDeniedException
in thecleanUpClasses
method.cleanUpClasses
method.