diff options
-rw-r--r-- | adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/CatalogDbRepositoryConfiguration.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/CatalogDbRepositoryConfiguration.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/CatalogDbRepositoryConfiguration.java index fdec7cf5d6..4d8f55e220 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/CatalogDbRepositoryConfiguration.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/CatalogDbRepositoryConfiguration.java @@ -20,8 +20,8 @@ package org.onap.so.adapters.catalogdb; -import java.util.stream.Collectors; import javax.persistence.EntityManager; +import javax.persistence.metamodel.Type; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; import org.springframework.data.rest.core.config.RepositoryRestConfiguration; @@ -35,8 +35,8 @@ public class CatalogDbRepositoryConfiguration extends RepositoryRestConfigurerAd @Override public void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) { - config.exposeIdsFor(entityManager.getMetamodel().getEntities().stream().map(e -> e.getJavaType()) - .collect(Collectors.toList()).toArray(new Class[0])); + config.exposeIdsFor( + entityManager.getMetamodel().getEntities().stream().map(Type::getJavaType).toArray(Class[]::new)); } } |