- // If CURRENT is null, then we are creating the first thread.
- // In this case we don't do the security check.
- if (current != null)
- g.checkAccess();
+ // If CURRENT is null, then we are bootstrapping the first thread.
+ // Use ThreadGroup.root, the main threadgroup.
+ if (current == null)
+ group = ThreadGroup.root;
+ else
+ group = current.getThreadGroup();