You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/03/17 05:34:43 UTC

[GitHub] [iotdb] wangchao316 commented on a change in pull request #5261: [IOTDB-2752] reconstructing the start and stop command

wangchao316 commented on a change in pull request #5261:
URL: https://github.com/apache/iotdb/pull/5261#discussion_r828768780



##########
File path: confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeConfCheck.java
##########
@@ -70,10 +70,10 @@ public void checkConfig() throws RepeatConfigurationException, IOException {
       }
     }
 
-    FileInputStream inputStream = new FileInputStream(specialPropertiesFile);
-    specialProperties.load(inputStream);
-    checkSpecialProperties();
-    inputStream.close();
+    try (FileInputStream inputStream = new FileInputStream(specialPropertiesFile)) {

Review comment:
       closed where it is used. Because we can't control where this method will be called later, if the caller gets an exception and does not kill the process, a link leak will occur.




-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org