提交 23103d2b authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Reduce try-catch area in FileStore.length() to debug code only

上级 fd791d19
...@@ -375,9 +375,9 @@ public class FileStore { ...@@ -375,9 +375,9 @@ public class FileStore {
* @return the file size * @return the file size
*/ */
public long length() { public long length() {
try { long len = fileLength;
long len = fileLength; if (ASSERT) {
if (ASSERT) { try {
len = file.size(); len = file.size();
if (len != fileLength) { if (len != fileLength) {
DbException.throwInternalError( DbException.throwInternalError(
...@@ -391,11 +391,11 @@ public class FileStore { ...@@ -391,11 +391,11 @@ public class FileStore {
DbException.throwInternalError( DbException.throwInternalError(
"unaligned file length " + name + " len " + len); "unaligned file length " + name + " len " + len);
} }
} catch (IOException e) {
throw DbException.convertIOException(e, name);
} }
return len;
} catch (IOException e) {
throw DbException.convertIOException(e, name);
} }
return len;
} }
/** /**
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论