mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 02:38:59 +07:00
ExpressionUtils#getQualifierOrThis -> getEffectiveQualifier, nullable now (cannot construct this expression for outer anonymous class)
Fixes EA-140652 - assert: JavaParserUtil.parseFragment
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
// "Replace Stream API chain with loop" "true"
|
||||
// "Fix all 'Stream API call chain can be replaced with loop' problems in file" "true"
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
public class Main {
|
||||
private static void test(List<String> list) {
|
||||
@@ -15,4 +14,29 @@ public class Main {
|
||||
public static void main(String[] args) {
|
||||
test(Arrays.asList("a", "b", "xyz"));
|
||||
}
|
||||
|
||||
void testLocal() {
|
||||
class X extends ArrayList<String> {
|
||||
class Y {
|
||||
void test() {
|
||||
for (String s : X.this) {
|
||||
System.out.println(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void testAnonymous() {
|
||||
new ArrayList<String>() {
|
||||
class Y {
|
||||
void test() {
|
||||
for (Iterator<String> it = stream().iterator(); it.hasNext(); ) {
|
||||
String s = it.next();
|
||||
System.out.println(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user