edwardcapriolo commented on code in PR #8106:
URL: https://github.com/apache/hadoop/pull/8106#discussion_r2679194553


##########
hadoop-common-project/hadoop-registry/src/main/java/org/apache/hadoop/registry/server/dns/RegistryDNS.java:
##########
@@ -805,6 +832,65 @@ public void nioTCPClient(SocketChannel ch) throws 
IOException {
 
   }
 
+  /**
+   * Process a UDP request.
+   *
+   * @param channel the datagram channel for the request.
+   * @param remoteAddress the socket address of client.
+   * @param input the input ByteBuffer.
+   * @throws IOException if the udp processing generates an issue.
+   */
+  public void nioUDPClient(DatagramChannel channel, SocketAddress 
remoteAddress, ByteBuffer input) throws IOException {
+    ByteBuffer output = ByteBuffer.allocate(4096);
+    byte[] in = null;
+    byte[] response = null;
+    Message query = null;
+    try {

Review Comment:
   Two nested try is generally considered a code smell. Sonar will tell you to 
design differently like using a method etc



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to