ExpressionUtils#getAssignment now returns simple assignments only (not compound assignments)

This commit is contained in:
Tagir Valeev
2016-10-04 14:16:08 +07:00
parent ee635ad74d
commit 6723bcc1ea
3 changed files with 36 additions and 3 deletions
@@ -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;
}
}
}
@@ -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;
}
}
}
}