otterc commented on code in PR #2120:
URL: 
https://github.com/apache/incubator-celeborn/pull/2120#discussion_r1408719604


##########
common/src/main/java/org/apache/celeborn/common/network/server/TransportServer.java:
##########
@@ -44,17 +47,25 @@ public class TransportServer implements Closeable {
 
   private final TransportContext context;
   private final TransportConf conf;
-
+  private final BaseMessageHandler appMessageHandler;
+  private final List<TransportServerBootstrap> bootstraps;
   private ServerBootstrap bootstrap;
   private ChannelFuture channelFuture;
   private AbstractSource source;
   private int port = -1;
 
   public TransportServer(
-      TransportContext context, String hostToBind, int portToBind, 
AbstractSource source) {
+      TransportContext context,
+      String hostToBind,
+      int portToBind,
+      AbstractSource source,
+      BaseMessageHandler appMessageHandler,
+      List<TransportServerBootstrap> bootstraps) {
     this.context = context;
     this.conf = context.getConf();
     this.source = source;
+    this.appMessageHandler = Preconditions.checkNotNull(appMessageHandler);
+    this.bootstraps = 
Lists.newArrayList(Preconditions.checkNotNull(bootstraps));

Review Comment:
   Creating a new list seems better to me. The passed in `bootstraps` reference 
will be available outside `TransportServer` and can be modified. This ensures 
that the `this.bootstraps` will not change after the `TransportServer` is 
initialized. 



-- 
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