From 595c7829b0ede975fffe4db0a7c8ec9c2affb688 Mon Sep 17 00:00:00 2001 From: marcinrzepeckiwroc Date: Thu, 25 Jun 2020 14:03:00 +0200 Subject: Replace lambda with a method reference Issue-ID: SO-1841 Signed-off-by: marcinrzepeckiwroc Change-Id: Idafac15166c6077895f645d1b9df1be7409ba5f1 --- .../so/adapters/catalogdb/CatalogDbRepositoryConfiguration.java | 6 +++--- 1 file 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)); } } -- cgit 1.2.3-korg