提交 44151a96 authored 作者: Noel Grandin's avatar Noel Grandin

missing close calls on some Closeable objects

上级 673fe5f7
...@@ -242,6 +242,7 @@ public class SelectUnion extends Query { ...@@ -242,6 +242,7 @@ public class SelectUnion extends Query {
result.addRow(values); result.addRow(values);
} }
} }
temp.close();
break; break;
} }
default: default:
......
...@@ -12,7 +12,6 @@ import java.util.BitSet; ...@@ -12,7 +12,6 @@ import java.util.BitSet;
import java.util.HashSet; import java.util.HashSet;
import java.util.Random; import java.util.Random;
import java.util.Set; import java.util.Set;
import org.h2.dev.hash.MinimalPerfectHash; import org.h2.dev.hash.MinimalPerfectHash;
import org.h2.dev.hash.MinimalPerfectHash.LongHash; import org.h2.dev.hash.MinimalPerfectHash.LongHash;
import org.h2.dev.hash.MinimalPerfectHash.StringHash; import org.h2.dev.hash.MinimalPerfectHash.StringHash;
...@@ -63,6 +62,7 @@ public class TestPerfectHash extends TestBase { ...@@ -63,6 +62,7 @@ public class TestPerfectHash extends TestBase {
} }
}; };
f.close();
HashSet<Text> set = new HashSet<Text>(); HashSet<Text> set = new HashSet<Text>();
Text t = new Text(data, 0); Text t = new Text(data, 0);
while (true) { while (true) {
......
...@@ -781,6 +781,7 @@ public class ArchiveTool { ...@@ -781,6 +781,7 @@ public class ArchiveTool {
byte[] header = new byte[4]; byte[] header = new byte[4];
dataIn.readFully(header); dataIn.readFully(header);
if (!Arrays.equals(header, HEADER)) { if (!Arrays.equals(header, HEADER)) {
tempOut.close();
throw new IOException("Invalid header"); throw new IOException("Invalid header");
} }
long size = readVarLong(dataIn); long size = readVarLong(dataIn);
......
...@@ -36,5 +36,7 @@ public class ThreadDumpFilter { ...@@ -36,5 +36,7 @@ public class ThreadDumpFilter {
} while(s != null && (s.length() == 0 || " \t\"".indexOf(s.charAt(0)) >= 0)); } while(s != null && (s.length() == 0 || " \t\"".indexOf(s.charAt(0)) >= 0));
} }
} }
writer.close();
in.close();
} }
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论