@@ -335,58 +335,6 @@ public static void dispatchUncaughtException(Thread thread, Throwable throwable)
335
335
}
336
336
}
337
337
338
- /**
339
- * Thread instance initialization.
340
- *
341
- * This method is a copy of the implementation of the JDK 8 method
342
- *
343
- * <code>Thread.init(ThreadGroup g, Runnable target, String name, long stackSize)</code>
344
- *
345
- * and the JDK 11 constructor
346
- *
347
- * <code>Thread(ThreadGroup g, Runnable target, String name, long stackSize,
348
- * AccessControlContext acc, boolean inheritThreadLocals)</code>
349
- *
350
- * with these unsupported features removed:
351
- * <ul>
352
- * <li>No security manager: using the ContextClassLoader of the parent.</li>
353
- * </ul>
354
- */
355
- static void initializeNewThread (
356
- Target_java_lang_Thread tjlt ,
357
- ThreadGroup groupArg ,
358
- Runnable target ,
359
- String name ,
360
- long stackSize ,
361
- boolean inheritThreadLocals ) {
362
- if (name == null ) {
363
- throw new NullPointerException ("The name cannot be null" );
364
- }
365
- tjlt .name = name ;
366
-
367
- final Thread parent = Thread .currentThread ();
368
- final ThreadGroup group = ((groupArg != null ) ? groupArg : parent .getThreadGroup ());
369
-
370
- int priority ;
371
- boolean daemon ;
372
- if (JavaThreads .toTarget (parent ) == tjlt ) {
373
- priority = Thread .NORM_PRIORITY ;
374
- daemon = false ;
375
- } else {
376
- priority = parent .getPriority ();
377
- daemon = parent .isDaemon ();
378
- }
379
-
380
- initThreadFields (tjlt , group , target , stackSize , priority , daemon );
381
-
382
- PlatformThreads .setThreadStatus (fromTarget (tjlt ), ThreadStatus .NEW );
383
-
384
- initNewThreadLocalsAndLoader (tjlt , inheritThreadLocals , parent );
385
-
386
- /* Set thread ID */
387
- tjlt .tid = nextThreadID ();
388
- }
389
-
390
338
static void initThreadFields (Target_java_lang_Thread tjlt , ThreadGroup group , Runnable target , long stackSize , int priority , boolean daemon ) {
391
339
assert tjlt .holder == null ;
392
340
tjlt .holder = new Target_java_lang_Thread_FieldHolder (group , target , stackSize , priority , daemon );
0 commit comments