BewareMyPower commented on a change in pull request #12080:
URL: https://github.com/apache/pulsar/pull/12080#discussion_r714751821



##########
File path: 
pulsar-io/hdfs2/src/main/java/org/apache/pulsar/io/hdfs2/AbstractHdfsConnector.java
##########
@@ -138,12 +137,8 @@ protected void checkHdfsUriForTimeout(Configuration 
config) throws IOException {
         }
         InetSocketAddress namenode = NetUtils.createSocketAddr(address, port);
         SocketFactory socketFactory = NetUtils.getDefaultSocketFactory(config);
-        Socket socket = null;
-        try {
-            socket = socketFactory.createSocket();
+        try(Socket socket = socketFactory.createSocket()) {

Review comment:
       ```suggestion
           try (Socket socket = socketFactory.createSocket()) {
   ```
   
   Add the space. I think currently the checkstyle plugin is not applied to 
pulsar-io module.




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