You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hx...@apache.org on 2019/04/20 04:07:12 UTC
[incubator-iotdb] branch fix_file_close_in_pageHeaderTest created
(now fa385af)
This is an automated email from the ASF dual-hosted git repository.
hxd pushed a change to branch fix_file_close_in_pageHeaderTest
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git.
at fa385af fix iotdb-82, close TsFileInput before remove the tsfile
This branch includes the following new commits:
new fa385af fix iotdb-82, close TsFileInput before remove the tsfile
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[incubator-iotdb] 01/01: fix iotdb-82,
close TsFileInput before remove the tsfile
Posted by hx...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
hxd pushed a commit to branch fix_file_close_in_pageHeaderTest
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
commit fa385af0de6019fd3e189857a803ec0316959c57
Author: xiangdong huang <sa...@gmail.com>
AuthorDate: Sat Apr 20 12:06:53 2019 +0800
fix iotdb-82, close TsFileInput before remove the tsfile
---
.../java/org/apache/iotdb/tsfile/file/header/PageHeaderTest.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tsfile/src/test/java/org/apache/iotdb/tsfile/file/header/PageHeaderTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/header/PageHeaderTest.java
index 4cd733e..6bf42a8 100644
--- a/tsfile/src/test/java/org/apache/iotdb/tsfile/file/header/PageHeaderTest.java
+++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/header/PageHeaderTest.java
@@ -119,18 +119,18 @@ public class PageHeaderTest {
}
private PageHeader deSerialized(int offset) {
- FileInputStream fis = null;
+ TsFileInput input = null;
PageHeader header = null;
try {
- TsFileInput input = new DefaultTsFileInput(Paths.get(PATH));
+ input = new DefaultTsFileInput(Paths.get(PATH));
header = PageHeader.deserializeFrom(DATA_TYPE, input, offset, true);
return header;
} catch (IOException e) {
e.printStackTrace();
} finally {
- if (fis != null) {
+ if (input != null) {
try {
- fis.close();
+ input.close();
} catch (IOException e) {
e.printStackTrace();
}