HHH-12485 - Avoid unnecessary exceptions during import class name lookup of metamodel
This commit is contained in:
parent
2de4277c34
commit
2bf323f01f
|
@ -77,6 +77,7 @@ public class MetamodelImpl implements MetamodelImplementor, Serializable {
|
||||||
// todo : Integrate EntityManagerLogger into CoreMessageLogger
|
// todo : Integrate EntityManagerLogger into CoreMessageLogger
|
||||||
private static final EntityManagerMessageLogger log = HEMLogging.messageLogger( MetamodelImpl.class );
|
private static final EntityManagerMessageLogger log = HEMLogging.messageLogger( MetamodelImpl.class );
|
||||||
private static final Object ENTITY_NAME_RESOLVER_MAP_VALUE = new Object();
|
private static final Object ENTITY_NAME_RESOLVER_MAP_VALUE = new Object();
|
||||||
|
private static final String INVALID_IMPORT = "";
|
||||||
|
|
||||||
private final SessionFactoryImplementor sessionFactory;
|
private final SessionFactoryImplementor sessionFactory;
|
||||||
|
|
||||||
|
@ -581,9 +582,13 @@ public class MetamodelImpl implements MetamodelImplementor, Serializable {
|
||||||
return className;
|
return className;
|
||||||
}
|
}
|
||||||
catch ( ClassLoadingException cnfe ) {
|
catch ( ClassLoadingException cnfe ) {
|
||||||
|
imports.put( className, INVALID_IMPORT );
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if ( result == INVALID_IMPORT ) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue