richardantal commented on code in PR #2312:
URL: https://github.com/apache/zookeeper/pull/2312#discussion_r2339031427


##########
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:
   Wouldn't it be beneficial to keep the ThreadGroup without the 
getSecurityManager?
   `ThreadGroup group = Thread.currentThread().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]

Reply via email to