Skip to content

fixes ISSUE-49435: prevents using legacy ThreadGroup

The only direct use in the code was to assign the newly created thread to the group, which was obtainged from the current thread that was creaing the new thread.

The Thread super constructor we are using Thread(ThreadGroup, Runnable, String name, long) documents that if the group is null and there is no security manager, the group is set to the current thread's thread group. Which is, in practice, the same that was done before. Also the stackSize parameter was always 0 which indicates to be ignored.

Taking into account all this, it is possible to use the simpler constructor Thread(Runnable target, String name).


Edited by Asier Lostalé

Merge request reports