Collectors.toList() -> .toList()

master
mjkhan21 5 months ago
parent 0e3552bc89
commit b35a9cf454

@ -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<Menu>{
return get(key);
})
.distinct()
.collect(Collectors.toList());
.toList();
ArrayList<Integer> result = new ArrayList<>();
setIDs(menus, result);

@ -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<String> active;
private List<String> 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;
}

Loading…
Cancel
Save