unwrap should raise a PE if the type is not unwrappable by the provider

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@18166 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Emmanuel Bernard 2009-12-08 16:32:59 +00:00
parent cab99355a9
commit 48c2ec7e91
1 changed files with 4 additions and 2 deletions

View File

@ -645,8 +645,10 @@ public abstract class AbstractEntityManagerImpl implements HibernateEntityManage
if ( clazz.equals( SessionImplementor.class ) ) {
return ( T ) getSession();
}
//FIXME
return null; //To change body of implemented methods use File | Settings | File Templates.
else {
//unknown class type
throw new PersistenceException( "Hibernate cannot unwrap " + clazz);
}
}
private void joinTransaction(boolean ignoreNotJoining) {