mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-10 13:14:50 +00:00
HHH-9665 - Allow EntityManagerFactoryImpl to be unwrapped only into public interfaces/classes
This commit is contained in:
parent
a2c3c74251
commit
ae0b5f8577
@ -107,14 +107,6 @@ public void testEntityManagerCanBeUnwrappedToSessionFactoryImpl() {
|
||||
|
||||
@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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user