Polishing

This commit is contained in:
Juergen Hoeller
2018-07-09 15:53:44 +02:00
parent d9e8d3bbe1
commit a80c5121fe
4 changed files with 24 additions and 24 deletions

View File

@@ -491,10 +491,10 @@ public abstract class ExtendedEntityManagerCreator {
}
private RuntimeException convertException(RuntimeException ex) {
DataAccessException daex = (this.exceptionTranslator != null) ?
DataAccessException dae = (this.exceptionTranslator != null) ?
this.exceptionTranslator.translateExceptionIfPossible(ex) :
EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(ex);
return (daex != null ? daex : ex);
return (dae != null ? dae : ex);
}
}

View File

@@ -533,9 +533,9 @@ public class JpaTransactionManager extends AbstractPlatformTransactionManager
}
catch (RollbackException ex) {
if (ex.getCause() instanceof RuntimeException) {
DataAccessException dex = getJpaDialect().translateExceptionIfPossible((RuntimeException) ex.getCause());
if (dex != null) {
throw dex;
DataAccessException dae = getJpaDialect().translateExceptionIfPossible((RuntimeException) ex.getCause());
if (dae != null) {
throw dae;
}
}
throw new TransactionSystemException("Could not commit JPA transaction", ex);