Mercurial > hg > openjdk > jdk8u > jdk
changeset 9403:cd9a093d0f63 jdk8u5-b09
8031050: (thread) Change Thread initialization so that thread name is set before invoking SecurityManager
Reviewed-by: alanb, dholmes, mchung
author | chegar |
---|---|
date | Tue, 11 Feb 2014 11:33:45 +0000 |
parents | a424a232fc39 |
children | ea16833d1c38 |
files | src/share/classes/java/lang/Thread.java |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/classes/java/lang/Thread.java Tue Feb 04 11:55:44 2014 +0000 +++ b/src/share/classes/java/lang/Thread.java Tue Feb 11 11:33:45 2014 +0000 @@ -366,6 +366,8 @@ throw new NullPointerException("name cannot be null"); } + this.name = name.toCharArray(); + Thread parent = currentThread(); SecurityManager security = System.getSecurityManager(); if (g == null) { @@ -402,7 +404,6 @@ this.group = g; this.daemon = parent.isDaemon(); this.priority = parent.getPriority(); - this.name = name.toCharArray(); if (security == null || isCCLOverridden(parent.getClass())) this.contextClassLoader = parent.getContextClassLoader(); else