mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
ExpressionUtils#getAssignment now returns simple assignments only (not compound assignments)
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
// "Replace with anyMatch()" "true"
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Main {
|
||||
public boolean testAnyMatch(List<String> data) {
|
||||
int x = 10;
|
||||
if (data.stream().map(String::trim).anyMatch(String::isEmpty)) {
|
||||
x *= 2;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// "Replace with anyMatch()" "true"
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Main {
|
||||
public boolean testAnyMatch(List<String> data) {
|
||||
int x = 10;
|
||||
for(String str : da<caret>ta) {
|
||||
String trimmed = str.trim();
|
||||
if(trimmed.isEmpty()) {
|
||||
x *= 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user