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
16 lines
322 B
Java
16 lines
322 B
Java
// "Replace with anyMatch()" "true"
|
|
|
|
import java.util.List;
|
|
|
|
public class Main {
|
|
public void testAssignment(List<String> data) {
|
|
String[] found = {"no"};
|
|
for(String str : da<caret>ta) {
|
|
String trimmed = str.trim();
|
|
if(!trimmed.isEmpty()) {
|
|
found[0] = "yes";
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
} |