From b8a30324e3a19d897668b7a8d7b9c7501290d185 Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Wed, 3 Jul 2024 09:49:39 +0900 Subject: [PATCH] Collectors.toList() -> .toList() --- src/main/java/cokr/xit/foundation/ApplicationContainer.java | 4 +--- src/main/java/cokr/xit/foundation/web/AccessInitializer.java | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/cokr/xit/foundation/ApplicationContainer.java b/src/main/java/cokr/xit/foundation/ApplicationContainer.java index 81f5de7..0572979 100644 --- a/src/main/java/cokr/xit/foundation/ApplicationContainer.java +++ b/src/main/java/cokr/xit/foundation/ApplicationContainer.java @@ -4,8 +4,6 @@ import java.net.InetAddress; import java.util.Date; import java.util.List; import java.util.Optional; -import java.util.stream.Collectors; -import java.util.stream.Stream; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; @@ -86,7 +84,7 @@ public class ApplicationContainer implements ApplicationContextAware { actx = applicationContext; applicationName = actx.getApplicationName(); String[] apf = Assert.ifEmpty(actx.getEnvironment().getActiveProfiles(), actx.getEnvironment()::getDefaultProfiles); - activeProfiles = Stream.of(apf).collect(Collectors.toList()); + activeProfiles = List.of(apf); startupDate = new Date(actx.getStartupDate()); secured = actx.containsBean("authorityService"); log().debug("{} loaded", this); diff --git a/src/main/java/cokr/xit/foundation/web/AccessInitializer.java b/src/main/java/cokr/xit/foundation/web/AccessInitializer.java index 96d52c2..35316ad 100644 --- a/src/main/java/cokr/xit/foundation/web/AccessInitializer.java +++ b/src/main/java/cokr/xit/foundation/web/AccessInitializer.java @@ -3,7 +3,6 @@ package cokr.xit.foundation.web; import java.text.SimpleDateFormat; import java.util.Locale; import java.util.Map; -import java.util.stream.Collectors; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; @@ -54,7 +53,6 @@ public class AccessInitializer extends RequestInterceptor { model.entrySet().stream() .filter(entry -> entry.getValue() instanceof ServiceRequest) .map(entry -> entry.getKey()) - .collect(Collectors.toList()) .forEach(model::remove); }