From ae0b5f8577c02ef7ad2d7d435c847cab27ac74b8 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Thu, 14 May 2015 12:12:06 -0500 Subject: [PATCH] HHH-9665 - Allow EntityManagerFactoryImpl to be unwrapped only into public interfaces/classes --- .../jpa/test/EntityManagerFactoryUnwrapTest.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/EntityManagerFactoryUnwrapTest.java b/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/EntityManagerFactoryUnwrapTest.java index 138426c233..21a841943e 100755 --- a/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/EntityManagerFactoryUnwrapTest.java +++ b/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/EntityManagerFactoryUnwrapTest.java @@ -107,14 +107,6 @@ public class EntityManagerFactoryUnwrapTest extends BaseEntityManagerFunctionalT @Test public void testEntityManagerCanBeUnwrappedToEntityManagerFactoryImpl() { - try { - entityManagerFactory.unwrap( EntityManagerFactoryImpl.class ); - fail( "It should not be possible to unwrap to an internal type." ); - } - catch ( PersistenceException e ) { - // ignore - } - EntityManagerFactoryImpl entityManager = entityManagerFactory.unwrap( EntityManagerFactoryImpl.class ); assertNotNull( "Unwrapping to EntityManagerFactoryImpl should be ok",