Skip to content

Commit

Permalink
HSEARCH-3425 Warnings: use of deprecated code
Browse files Browse the repository at this point in the history
  • Loading branch information
yrodiere committed Feb 8, 2019
1 parent 858ba95 commit ddf3af0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Expand Up @@ -38,6 +38,7 @@

import org.apache.http.nio.client.HttpAsyncClient;
import org.assertj.core.api.Assertions;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.RestClient;
import org.json.JSONException;
Expand Down Expand Up @@ -351,7 +352,7 @@ public void backend_getClient() throws Exception {
RestClient restClient = elasticsearchBackend.getClient( RestClient.class );

// Test that the client actually works
Response response = restClient.performRequest( "GET", "/" );
Response response = restClient.performRequest( new Request( "GET", "/" ) );
Assertions.assertThat( response.getStatusLine().getStatusCode() ).isEqualTo( 200 );
}

Expand Down
Expand Up @@ -10,7 +10,7 @@
import java.util.List;
import javax.enterprise.inject.spi.BeanManager;

import org.hibernate.jpa.event.spi.jpa.ExtendedBeanManager;
import org.hibernate.resource.beans.container.spi.ExtendedBeanManager;
import org.hibernate.search.mapper.orm.spi.EnvironmentSynchronizer;

/**
Expand Down
Expand Up @@ -69,10 +69,11 @@ public class HibernateOrmBootstrapIntrospector implements PojoBootstrapIntrospec
*/
private final Map<Class<?>, PojoRawTypeModel<?>> typeModelCache = new HashMap<>();

@SuppressWarnings("deprecation") // There is no alternative to getReflectionManager() at the moment.
public HibernateOrmBootstrapIntrospector(Metadata metadata, SessionFactoryImplementor sessionFactoryImplementor) {
ReflectionManager metadataReflectionManager = null;
if ( metadata instanceof MetadataImplementor ) {
metadataReflectionManager = ((MetadataImplementor) metadata).getMetadataBuildingOptions().getReflectionManager();
metadataReflectionManager = ((MetadataImplementor) metadata).getTypeConfiguration().getMetadataBuildingContext().getBootstrapContext().getReflectionManager();
}
if ( metadataReflectionManager != null ) {
this.reflectionManager = metadataReflectionManager;
Expand Down

0 comments on commit ddf3af0

Please sign in to comment.