mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-11 02:39:37 +07:00
1. findFirst() scenario can pull previous assignment (not declaration) now 2. anyMatch() fix did not work if there's single assignment to non-variable (e.g. array element) 3. if non-adjacent return becomes unreachable after findFirst()/anyMatch(), it returned automatically now
12 lines
286 B
Java
12 lines
286 B
Java
// "Replace with anyMatch()" "true"
|
|
|
|
import java.util.List;
|
|
|
|
public class Main {
|
|
public void testAssignment(List<String> data) {
|
|
String[] found = {"no"};
|
|
if (data.stream().map(String::trim).anyMatch(trimmed -> !trimmed.isEmpty())) {
|
|
found[0] = "yes";
|
|
}
|
|
}
|
|
} |