changeset 15893:018d32ec6817

8165064: Enhance thread contexts in JNDI Reviewed-by: chegar
author vinnie
date Thu, 13 Oct 2016 15:27:33 +0100
parents 7c5d9a59941c
children 2e7a303cd1ec
files src/java.base/share/classes/java/lang/Thread.java
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/Thread.java	Wed Oct 12 13:53:41 2016 -0400
+++ b/src/java.base/share/classes/java/lang/Thread.java	Thu Oct 13 15:27:33 2016 +0100
@@ -504,11 +504,12 @@
     }
 
     /**
-     * Creates a new Thread that inherits the given AccessControlContext.
+     * Creates a new Thread that inherits the given AccessControlContext
+     * but thread-local variables are not inherited.
      * This is not a public constructor.
      */
     Thread(Runnable target, AccessControlContext acc) {
-        init(null, target, "Thread-" + nextThreadNum(), 0, acc, true);
+        init(null, target, "Thread-" + nextThreadNum(), 0, acc, false);
     }
 
     /**