diff --git a/src/main/java/cokr/xit/base/menu/MenuContext.java b/src/main/java/cokr/xit/base/menu/MenuContext.java index b8237d1..2c33b23 100644 --- a/src/main/java/cokr/xit/base/menu/MenuContext.java +++ b/src/main/java/cokr/xit/base/menu/MenuContext.java @@ -2,7 +2,6 @@ package cokr.xit.base.menu; import java.util.ArrayList; import java.util.List; -import java.util.stream.Collectors; import java.util.stream.Stream; import cokr.xit.foundation.data.hierarchy.Hierarchy; @@ -38,7 +37,7 @@ public class MenuContext extends Hierarchy{ return get(key); }) .distinct() - .collect(Collectors.toList()); + .toList(); ArrayList result = new ArrayList<>(); setIDs(menus, result); diff --git a/src/main/java/cokr/xit/base/menu/web/MenuInjector.java b/src/main/java/cokr/xit/base/menu/web/MenuInjector.java index 17cc3c0..fc15257 100644 --- a/src/main/java/cokr/xit/base/menu/web/MenuInjector.java +++ b/src/main/java/cokr/xit/base/menu/web/MenuInjector.java @@ -1,7 +1,6 @@ package cokr.xit.base.menu.web; import java.util.List; -import java.util.stream.Collectors; import java.util.stream.Stream; import javax.annotation.Resource; @@ -40,12 +39,12 @@ public class MenuInjector extends RequestInterceptor { private List active; private List getActive() { - return !isEmpty(active) ? active : (active = Stream.of(HTML_GET).collect(Collectors.toList())); + return !isEmpty(active) ? active : (active = Stream.of(HTML_GET).toList()); } public void setActive(String... active) { this.active = !isEmpty(active) ? - Stream.of(active).map(String::toLowerCase).collect(Collectors.toList()) + Stream.of(active).map(String::toLowerCase).toList() : null; }