You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2020/07/13 13:22:40 UTC

[incubator-iotdb] 02/02: fix check properties

This is an automated email from the ASF dual-hosted git repository.

haonan pushed a commit to branch fix_tmpProperties_0_10
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git

commit 1236844db77f2a1c4cf34c153c4ed423ec57bb31
Author: HTHou <hh...@outlook.com>
AuthorDate: Mon Jul 13 21:22:09 2020 +0800

    fix check properties
---
 server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfigCheck.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfigCheck.java b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfigCheck.java
index c40fb43..b1e1201 100644
--- a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfigCheck.java
+++ b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfigCheck.java
@@ -177,8 +177,10 @@ public class IoTDBConfigCheck {
     }
 
     // no tmp file, read properties from system.properties
-    try (FileInputStream inputStream = new FileInputStream(propertiesFile)) {
-      properties.load(new InputStreamReader(inputStream, TSFileConfig.STRING_CHARSET));
+    try (FileInputStream inputStream = new FileInputStream(propertiesFile);
+        InputStreamReader inputStreamReader = new InputStreamReader(
+            inputStream, TSFileConfig.STRING_CHARSET)) {
+      properties.load(inputStreamReader);
     }
     // need to upgrade from 0.9 to 0.10
     if (!properties.containsKey(IOTDB_VERSION_STRING)) {