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); }