cleaner variable name

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@16217 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Emmanuel Bernard 2009-03-25 21:07:29 +00:00
parent 1c42279492
commit 38471d1b73
1 changed files with 9 additions and 9 deletions

View File

@ -38,23 +38,23 @@ public class EntityManagerImpl extends AbstractEntityManagerImpl {
this.sessionFactory = sessionFactory;
this.open = true;
this.discardOnClose = discardOnClose;
Object localSic = null;
if (properties != null) localSic = properties.get( HibernatePersistence.SESSION_INTERCEPTOR );
if ( localSic != null ) {
if (localSic instanceof Class) {
sessionInterceptorClass = (Class) localSic;
Object localSessionInterceptor = null;
if (properties != null) localSessionInterceptor = properties.get( HibernatePersistence.SESSION_INTERCEPTOR );
if ( localSessionInterceptor != null ) {
if (localSessionInterceptor instanceof Class) {
sessionInterceptorClass = (Class) localSessionInterceptor;
}
else if (localSic instanceof String) {
else if (localSessionInterceptor instanceof String) {
try {
sessionInterceptorClass =
ReflectHelper.classForName( (String) localSic, EntityManagerImpl.class );
ReflectHelper.classForName( (String) localSessionInterceptor, EntityManagerImpl.class );
}
catch (ClassNotFoundException e) {
throw new PersistenceException("Unable to instanciate interceptor: " + localSic, e);
throw new PersistenceException("Unable to instanciate interceptor: " + localSessionInterceptor, e);
}
}
else {
throw new PersistenceException("Unable to instanciate interceptor: " + localSic);
throw new PersistenceException("Unable to instanciate interceptor: " + localSessionInterceptor);
}
}
this.sessionInterceptorClass = sessionInterceptorClass;