Skip to content
Permalink
Browse files
8271624: Avoid unnecessary ThreadGroup.checkAccess calls when creatin…
…g Threads

Reviewed-by: rriggs
  • Loading branch information
cl4es committed Aug 2, 2021
1 parent e621cff commit 0b9539405d764670a1a6dca5a6552b58c3edd7a3
Showing 1 changed file with 4 additions and 4 deletions.
@@ -417,14 +417,14 @@ private Thread(ThreadGroup g, Runnable target, String name,
}
}

/* checkAccess regardless of whether or not threadgroup is
explicitly passed in. */
g.checkAccess();

/*
* Do we have the required permissions?
*/
if (security != null) {
/* checkAccess regardless of whether or not threadgroup is
explicitly passed in. */
security.checkAccess(g);

if (isCCLOverridden(getClass())) {
security.checkPermission(
SecurityConstants.SUBCLASS_IMPLEMENTATION_PERMISSION);

1 comment on commit 0b95394

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 0b95394 Aug 2, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.