if (returnTypeIsProjection) {
buildFieldNamesMap(entity, returnType, entityProjectionAnnotation, typesFieldMaps);
typesAreProjections.put(returnType, true);
}
final RepositoryJpaCustomMetadata repositoryCustomMetadata =
<BUG>getMetadataService().get(repositoryCustomMetadataKey);
final String javaBeanMetadataKey = JavaBeanMetadata.createIdentifier(entityDetails);</BUG>
final String jpaEntityMetadataKey = JpaEntityMetadata.createIdentifier(entityDetails);
JpaEntityMetadata entityMetadata = getMetadataService().get(jpaEntityMetadataKey);
registerDependency(javaBeanMetadataKey, metadataIdentificationString);

if (returnTypeIsProjection) {
buildFieldNamesMap(entity, returnType, entityProjectionAnnotation, typesFieldMaps);
typesAreProjections.put(returnType, true);
}
final RepositoryJpaCustomMetadata repositoryCustomMetadata =
getMetadataService().get(repositoryCustomMetadataKey);
if (repositoryCustomMetadata == null) {
return null;
}
final String javaBeanMetadataKey = JavaBeanMetadata.createIdentifier(entityDetails);
final String jpaEntityMetadataKey = JpaEntityMetadata.createIdentifier(entityDetails);
JpaEntityMetadata entityMetadata = getMetadataService().get(jpaEntityMetadataKey);
registerDependency(javaBeanMetadataKey, metadataIdentificationString);
