Source:
public <T> ElasticsearchScopedIndexFieldComponent<T> getSchemaNodeComponent(String absoluteFieldPath, IndexSchemaFieldNodeComponentRetrievalStrategy<T> componentRetrievalStrategy) { ElasticsearchIndexModel indexModelForSelectedSchemaNode = null; ElasticsearchIndexSchemaFieldNode<?> selectedSchemaNode = null; T selectedComponent = null; ElasticsearchConverterCompatibilityChecker converterChecker = null; for ( ElasticsearchIndexModel indexModel : indexModels ) { ElasticsearchIndexSchemaFieldNode<?> schemaNode = indexModel.getFieldNode( absoluteFieldPath ); if ( schemaNode != null ) { T component = componentRetrievalStrategy.extractComponent( schemaNode ); if ( selectedSchemaNode == null ) { selectedSchemaNode = schemaNode; indexModelForSelectedSchemaNode = indexModel; selectedComponent = component; } else if ( componentRetrievalStrategy.areIncompatible( selectedComponent, component ) ) { throw componentRetrievalStrategy.createCompatibilityException( absoluteFieldPath, selectedComponent, component, EventContexts.fromIndexNames( indexModelForSelectedSchemaNode.getHibernateSearchIndexName(), indexModel.getHibernateSearchIndexName() ) ); } else if ( componentRetrievalStrategy.arePotentiallyIncompatible( selectedComponent, component ) ) { converterChecker = new ElasticsearchFailingConverterCompatibilityChecker<>( absoluteFieldPath, selectedComponent, component, EventContexts.fromIndexNames( indexModelForSelectedSchemaNode.getHibernateSearchIndexName(), indexModel.getHibernateSearchIndexName() ), componentRetrievalStrategy ); } } } if ( selectedSchemaNode == null ) { throw log.unknownFieldForSearch( absoluteFieldPath, getIndexesEventContext() ); } if ( converterChecker == null ) { converterChecker = new ElasticsearchSucceedingConverterCompatibilityChecker(); } return new ElasticsearchScopedIndexFieldComponent( selectedComponent, converterChecker ); }

Target:
public <T> ElasticsearchScopedIndexFieldComponent<T> getSchemaNodeComponent(String absoluteFieldPath, IndexSchemaFieldNodeComponentRetrievalStrategy<T> componentRetrievalStrategy) { ElasticsearchIndexModel indexModelForSelectedSchemaNode = null; ElasticsearchIndexSchemaFieldNode<?> selectedSchemaNode = null; T selectedComponent = null; ElasticsearchConverterCompatibilityChecker converterChecker = null; for ( ElasticsearchIndexModel indexModel : indexModels ) { ElasticsearchIndexSchemaFieldNode<?> schemaNode = indexModel.getFieldNode( absoluteFieldPath ); if ( schemaNode != null ) { T component = componentRetrievalStrategy.extractComponent( schemaNode ); if ( selectedSchemaNode == null ) { selectedSchemaNode = schemaNode; indexModelForSelectedSchemaNode = indexModel; selectedComponent = component; } else if ( !componentRetrievalStrategy.hasCompatibleCodec( selectedComponent, component ) ) { throw componentRetrievalStrategy.createCompatibilityException( absoluteFieldPath, selectedComponent, component, EventContexts.fromIndexNames( indexModelForSelectedSchemaNode.getHibernateSearchIndexName(), indexModel.getHibernateSearchIndexName() ) ); } else if ( !componentRetrievalStrategy.hasCompatibleConverter( selectedComponent, component ) ) { converterChecker = new ElasticsearchFailingConverterCompatibilityChecker<>( absoluteFieldPath, selectedComponent, component, EventContexts.fromIndexNames( indexModelForSelectedSchemaNode.getHibernateSearchIndexName(), indexModel.getHibernateSearchIndexName() ), componentRetrievalStrategy ); } } } if ( selectedSchemaNode == null ) { throw log.unknownFieldForSearch( absoluteFieldPath, getIndexesEventContext() ); } if ( converterChecker == null ) { converterChecker = new ElasticsearchSucceedingConverterCompatibilityChecker(); } return new ElasticsearchScopedIndexFieldComponent( selectedComponent, converterChecker ); }