Expose DefaultThreadFactory.threadGroup to sub-classes

Motivation:

DefaultThreadFactory allows to override the newThread(...) method and so should have access to all fields that are set via the constructor.

Modifications:

Change threadGroup from private to protected visibility.

Result:

Easier to extend DefaultThreadFactory.
This commit is contained in:
Norman Maurer 2016-06-13 11:02:37 +02:00
parent 8f3a5e5b18
commit 8ccc795314

View File

@ -34,7 +34,7 @@ public class DefaultThreadFactory implements ThreadFactory {
private final String prefix;
private final boolean daemon;
private final int priority;
private final ThreadGroup threadGroup;
protected final ThreadGroup threadGroup;
public DefaultThreadFactory(Class<?> poolType) {
this(poolType, false, Thread.NORM_PRIORITY);