anmolnar commented on code in PR #2312:
URL: https://github.com/apache/zookeeper/pull/2312#discussion_r2341676931
##########
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumCnxManager.java:
##########
@@ -344,10 +344,7 @@ public QuorumCnxManager(QuorumPeer self, final long mySid,
Map<Long, QuorumPeer.
// can take extra time)
private void initializeConnectionExecutor(final long mySid, final int
quorumCnxnThreadsSize) {
final AtomicInteger threadIndex = new AtomicInteger(1);
- SecurityManager s = System.getSecurityManager();
- final ThreadGroup group = (s != null) ? s.getThreadGroup() :
Thread.currentThread().getThreadGroup();
-
- final ThreadFactory daemonThFactory = runnable -> new Thread(group,
runnable,
+ final ThreadFactory daemonThFactory = runnable -> new Thread(runnable,
Review Comment:
I don't think we need that. Thread's constructor already does the right
thing.
```java
SecurityManager sm = System.getSecurityManager();
if (g == null) {
// the security manager can choose the thread group
if (sm != null) {
g = sm.getThreadGroup();
}
// default to current thread's group
if (g == null) {
g = parent.getThreadGroup();
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]