[ 
https://issues.apache.org/jira/browse/HADOOP-18302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17580515#comment-17580515
 ] 

ASF GitHub Bot commented on HADOOP-18302:
-----------------------------------------

slfan1989 commented on code in PR #4457:
URL: https://github.com/apache/hadoop/pull/4457#discussion_r947366781


##########
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestHttpServer.java:
##########
@@ -663,8 +662,7 @@ private HttpServer2 checkBindAddress(String host, int port, 
boolean findPort)
     HttpServer2 server = createServer(host, port);
     try {
       // not bound, ephemeral should return requested port (0 for ephemeral)
-      List<?> listeners = (List<?>) Whitebox.getInternalState(server,
-          "listeners");
+      List<?> listeners = server.getListeners();
       ServerConnector listener = (ServerConnector)listeners.get(0);

Review Comment:
   Thank you very much for your help reviewing the code, I will modify the code.



##########
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestHttpServer.java:
##########
@@ -740,8 +738,7 @@ public void testBacklogSize() throws Exception
     Configuration conf = new Configuration();
     conf.setInt(HttpServer2.HTTP_SOCKET_BACKLOG_SIZE_KEY, backlogSize);
     HttpServer2 srv = createServer("test", conf);
-    List<?> listeners = (List<?>) Whitebox.getInternalState(srv,
-            "listeners");
+    List<?> listeners = srv.getListeners();
     ServerConnector listener = (ServerConnector)listeners.get(0);

Review Comment:
   I will fix it.





> Remove WhiteBox in hadoop-common module.
> ----------------------------------------
>
>                 Key: HADOOP-18302
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18302
>             Project: Hadoop Common
>          Issue Type: Sub-task
>    Affects Versions: 3.4.0, 3.3.9
>            Reporter: fanshilun
>            Assignee: fanshilun
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 4h 10m
>  Remaining Estimate: 0h
>
> WhiteBox is deprecated, try to remove this method in hadoop-common.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to