mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-34288 (IOE: PsiJavaParserFacadeImpl.createExpressionFromText)
This commit is contained in:
+5
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2011 Bas Leijdekkers
|
||||
* Copyright 2006-201@ Bas Leijdekkers
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -73,6 +73,10 @@ public class UnqualifiedFieldAccessInspection extends BaseInspection {
|
||||
if (field.hasModifierProperty(PsiModifier.STATIC)) {
|
||||
return;
|
||||
}
|
||||
final PsiClass containingClass = field.getContainingClass();
|
||||
if (containingClass instanceof PsiAnonymousClass) {
|
||||
return;
|
||||
}
|
||||
registerError(expression);
|
||||
}
|
||||
}
|
||||
|
||||
+5
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2011 Bas Leijdekkers
|
||||
* Copyright 2006-2012 Bas Leijdekkers
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -68,6 +68,10 @@ public class UnqualifiedMethodAccessInspection extends BaseInspection {
|
||||
if (method.isConstructor() || method.hasModifierProperty(PsiModifier.STATIC)) {
|
||||
return;
|
||||
}
|
||||
final PsiClass containingClass = method.getContainingClass();
|
||||
if (containingClass instanceof PsiAnonymousClass) {
|
||||
return;
|
||||
}
|
||||
registerError(expression);
|
||||
}
|
||||
}
|
||||
|
||||
+13
@@ -9,4 +9,17 @@ public class UnqualifiedFieldAccess {
|
||||
final String s = String.valueOf(field.hashCode());
|
||||
System.out.println(s);
|
||||
}
|
||||
|
||||
void foo() {
|
||||
new Object() {
|
||||
int i;
|
||||
void foo() {
|
||||
new Object() {
|
||||
void foo() {
|
||||
i = 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
+12
@@ -15,4 +15,16 @@ public class UnqualifiedMethodAccess extends JPanel {
|
||||
void foo(String s) {
|
||||
this.foo();
|
||||
}
|
||||
|
||||
void anonymous() {
|
||||
new Object() {
|
||||
void bar() {
|
||||
new Object() {
|
||||
void foo() {
|
||||
bar();
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user