mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-06 01:43:57 +07:00
GitOrigin-RevId: c4db6507c258e5611f6d47b9373a0c2531802345
9 lines
257 B
Java
9 lines
257 B
Java
// "Collapse loop with stream 'toArray()'" "true-preview"
|
|
|
|
import java.util.*;
|
|
|
|
public class Main {
|
|
public Object[] testToArray(List<String> data) {
|
|
return data.stream().filter(str -> !str.isEmpty()).distinct().sorted().toArray(String[]::new);
|
|
}
|
|
} |