Skip to content

Commit dadf9bb

Browse files
committed
refactor(db): simplify TronDatabase.close() by dropping redundant try/finally
doClose() swallows all exceptions internally (both writeOptions and dbSource paths log at WARN and do not rethrow), so the outer try/finally only existed to print the End log. Matches the same simplification applied to CheckPointV2Store.close() in the previous commit. Addresses review feedback on PR #6688.
1 parent cc57817 commit dadf9bb

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

chainbase/src/main/java/org/tron/core/db/TronDatabase.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,8 @@ public void reset() {
7676
@Override
7777
public void close() {
7878
logger.info("******** Begin to close {}. ********", getName());
79-
try {
80-
doClose();
81-
} finally {
82-
logger.info("******** End to close {}. ********", getName());
83-
}
79+
doClose();
80+
logger.info("******** End to close {}. ********", getName());
8481
}
8582

8683
/**

0 commit comments

Comments
 (0)