Remove unreachable code from TransactionTemplate [SPR-10148] #14781
Labels
in: data
Issues in data modules (jdbc, orm, oxm, tx)
status: declined
A suggestion or change that we don't feel we should currently apply
type: task
A general task
Elad Tabak opened SPR-10148 and commented
The method org.springframework.transaction.support.TransactionTemplate.exectue() have dead code where calling upon the TransactionCallback.doInTransaction() is surrounded with 'try/catch', only the last "catch" for "Exception" is unnecessary, since the "doInTransaction()" does not declare any checked exception to be thrown.
The last "catch" statement is actually dead/unreachable code, since only RuntimeExceptions and Errors can be thrown from the "doInTransaction" method.
Affects: 3.1.3
Issue Links:
The text was updated successfully, but these errors were encountered: