Author: epbernard
Date: 2009-12-08 11:32:59 -0500 (Tue, 08 Dec 2009)
New Revision: 18166
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/AbstractEntityManagerImpl.java
Log:
unwrap should raise a PE if the type is not unwrappable by the provider
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/AbstractEntityManagerImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/AbstractEntityManagerImpl.java 2009-12-08
16:16:27 UTC (rev 18165)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/AbstractEntityManagerImpl.java 2009-12-08
16:32:59 UTC (rev 18166)
@@ -645,8 +645,10 @@
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) {
Show replies by date