mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
not initialized problem: fix static fields checks
This commit is contained in:
@@ -318,7 +318,7 @@ public class HighlightControlFlowUtil {
|
||||
return null;
|
||||
}
|
||||
final PsiField anotherField = PsiTreeUtil.getTopmostParentOfType(expression, PsiField.class);
|
||||
if (anotherField != null && anotherField.getContainingClass() == aClass) {
|
||||
if (anotherField != null && anotherField.getContainingClass() == aClass && !field.hasModifierProperty(PsiModifier.STATIC)) {
|
||||
startOffset = 0;
|
||||
}
|
||||
block = null;
|
||||
|
||||
@@ -239,4 +239,14 @@ class IDEA100237 {
|
||||
final int qux = <error descr="Variable 'bar' might not have been initialized">bar</error>.hashCode() + 1;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
class StaticInitializerUsedInAnotherStaticField {
|
||||
private static final int ENUMERATION_CACHE_SIZE;
|
||||
|
||||
static {
|
||||
ENUMERATION_CACHE_SIZE = 0;
|
||||
}
|
||||
|
||||
private static final int ourEnumerationCacheConstant = ENUMERATION_CACHE_SIZE;
|
||||
}
|
||||
Reference in New Issue
Block a user