提交 c9c2f91e authored 作者: Andrei Tokar's avatar Andrei Tokar

code review suggestions from @katzyn

上级 a9e71a03
...@@ -186,13 +186,13 @@ public class FileStore { ...@@ -186,13 +186,13 @@ public class FileStore {
* Close this store. * Close this store.
*/ */
public void close() { public void close() {
if(file != null && file.isOpen()) {
try { try {
if (fileLock != null && fileLock.isValid()) { if(file != null && file.isOpen()) {
if (fileLock != null) {
fileLock.release(); fileLock.release();
} }
file.close(); file.close();
freeSpace.clear(); }
} catch (Exception e) { } catch (Exception e) {
throw DataUtils.newIllegalStateException( throw DataUtils.newIllegalStateException(
DataUtils.ERROR_WRITING_FAILED, DataUtils.ERROR_WRITING_FAILED,
...@@ -202,7 +202,6 @@ public class FileStore { ...@@ -202,7 +202,6 @@ public class FileStore {
file = null; file = null;
} }
} }
}
/** /**
* Flush all changes. * Flush all changes.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论