Skip to content
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

Set AccessControlContext to null on termination to release captured c… #109

Merged
merged 2 commits into from Aug 10, 2021

Conversation

Sanne
Copy link
Contributor

@Sanne Sanne commented Aug 2, 2021

…lassloaders

Followup to #108 as suggested by @dmlloyd

@@ -191,7 +191,7 @@
* The access control context of the creating thread.
* Will be set to null when the MBean is not registered.
*/
private final AccessControlContext acc;
private volatile AccessControlContext acc;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is volatile necessary given that it's only updated via completeTermination?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I think it's better to make it volatile. It certainly doesn't hurt.

@Sanne
Copy link
Contributor Author

Sanne commented Aug 5, 2021

I've added also commit b3cb132 to fix a problem I introduced in my previous PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants