jdk/src/share/classes/java/lang/Thread.java
changeset 23919 9377318e77ac
parent 23006 7cb4567eb213
child 24865 09b1d992ca72
equal deleted inserted replaced
23918:5f40f1d88890 23919:9377318e77ac
   364                       long stackSize, AccessControlContext acc) {
   364                       long stackSize, AccessControlContext acc) {
   365         if (name == null) {
   365         if (name == null) {
   366             throw new NullPointerException("name cannot be null");
   366             throw new NullPointerException("name cannot be null");
   367         }
   367         }
   368 
   368 
       
   369         this.name = name.toCharArray();
       
   370 
   369         Thread parent = currentThread();
   371         Thread parent = currentThread();
   370         SecurityManager security = System.getSecurityManager();
   372         SecurityManager security = System.getSecurityManager();
   371         if (g == null) {
   373         if (g == null) {
   372             /* Determine if it's an applet or not */
   374             /* Determine if it's an applet or not */
   373 
   375 
   400         g.addUnstarted();
   402         g.addUnstarted();
   401 
   403 
   402         this.group = g;
   404         this.group = g;
   403         this.daemon = parent.isDaemon();
   405         this.daemon = parent.isDaemon();
   404         this.priority = parent.getPriority();
   406         this.priority = parent.getPriority();
   405         this.name = name.toCharArray();
       
   406         if (security == null || isCCLOverridden(parent.getClass()))
   407         if (security == null || isCCLOverridden(parent.getClass()))
   407             this.contextClassLoader = parent.getContextClassLoader();
   408             this.contextClassLoader = parent.getContextClassLoader();
   408         else
   409         else
   409             this.contextClassLoader = parent.contextClassLoader;
   410             this.contextClassLoader = parent.contextClassLoader;
   410         this.inheritedAccessControlContext =
   411         this.inheritedAccessControlContext =