Join identical catch branches
See gh-2052
This commit is contained in:
committed by
Stephane Nicoll
parent
93e7a0a59d
commit
a218bf40cd
@@ -121,14 +121,10 @@ public class SpringJtaSynchronizationAdapter implements Synchronization {
|
||||
boolean readOnly = TransactionSynchronizationManager.isCurrentTransactionReadOnly();
|
||||
this.springSynchronization.beforeCommit(readOnly);
|
||||
}
|
||||
catch (RuntimeException ex) {
|
||||
catch (RuntimeException | Error ex) {
|
||||
setRollbackOnlyIfPossible();
|
||||
throw ex;
|
||||
}
|
||||
catch (Error err) {
|
||||
setRollbackOnlyIfPossible();
|
||||
throw err;
|
||||
}
|
||||
finally {
|
||||
// Process Spring's beforeCompletion early, in order to avoid issues
|
||||
// with strict JTA implementations that issue warnings when doing JDBC
|
||||
|
||||
Reference in New Issue
Block a user