diff options
author | crazybob <crazybob@google.com> | 2009-06-16 12:01:05 -0500 |
---|---|---|
committer | crazybob <crazybob@google.com> | 2009-06-16 12:01:05 -0500 |
commit | 4be266d6f64238e324e60a0c14f119d35a2e807b (patch) | |
tree | 0888d0d339747c4a8920864e92bd96c30f961e20 /luni-kernel | |
parent | 21a8f1ff4c7728776f1af48c5057cfd6871bc917 (diff) | |
download | libcore-4be266d6f64238e324e60a0c14f119d35a2e807b.zip libcore-4be266d6f64238e324e60a0c14f119d35a2e807b.tar.gz libcore-4be266d6f64238e324e60a0c14f119d35a2e807b.tar.bz2 |
Modified Thread to copy the context class loader from parent to child threads. Re-enabled test that covers this. Removed security-related code from test since it was invalid (the security check
doesn't occur if the calling code's class loader is an ancestor of the context class loader).
Diffstat (limited to 'luni-kernel')
-rw-r--r-- | luni-kernel/src/main/java/java/lang/Thread.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/luni-kernel/src/main/java/java/lang/Thread.java b/luni-kernel/src/main/java/java/lang/Thread.java index d3795f8..3cde7e1 100644 --- a/luni-kernel/src/main/java/java/lang/Thread.java +++ b/luni-kernel/src/main/java/java/lang/Thread.java @@ -508,6 +508,8 @@ public class Thread implements Runnable { this.priority = currentThread.getPriority(); + this.contextClassLoader = currentThread.contextClassLoader; + // Transfer over InheritableThreadLocals. if (currentThread.inheritableValues != null) { inheritableValues |