Collectors.toList() -> .toList()

master
mjkhan21 5 months ago
parent 2f644a285f
commit b8a30324e3

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

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

Loading…
Cancel
Save