Class identity comparisons wherever possible

Issue: SPR-12926
This commit is contained in:
Juergen Hoeller
2015-05-20 14:34:09 +02:00
parent 57e0c789a8
commit b4095c3e1d
108 changed files with 317 additions and 322 deletions

View File

@@ -408,7 +408,7 @@ public abstract class HibernateAccessor implements InitializingBean, BeanFactory
if (getJdbcExceptionTranslator() != null && ex instanceof JDBCException) {
return convertJdbcAccessException((JDBCException) ex, getJdbcExceptionTranslator());
}
else if (GenericJDBCException.class.equals(ex.getClass())) {
else if (GenericJDBCException.class == ex.getClass()) {
return convertJdbcAccessException((GenericJDBCException) ex, getDefaultJdbcExceptionTranslator());
}
return SessionFactoryUtils.convertHibernateAccessException(ex);

View File

@@ -794,7 +794,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
if (getJdbcExceptionTranslator() != null && ex instanceof JDBCException) {
return convertJdbcAccessException((JDBCException) ex, getJdbcExceptionTranslator());
}
else if (GenericJDBCException.class.equals(ex.getClass())) {
else if (GenericJDBCException.class == ex.getClass()) {
return convertJdbcAccessException((GenericJDBCException) ex, getDefaultJdbcExceptionTranslator());
}
return SessionFactoryUtils.convertHibernateAccessException(ex);