boolean (DfaValue constValue, @NotNull PsiReferenceExpression refExpr, PsiModifierListOwner var) { // If static final field is referred from the same or inner/nested class, // we consider that it might be uninitialized yet as some class initializers may call its methods or // even instantiate objects of this class and call their methods if (!constValue.getDfType().isConst(var)) return false; if (!(var instanceof PsiField) || var instanceof PsiEnumConstant) return false; return PsiTreeUtil.getTopmostParentOfType(refExpr, PsiClass.class) == PsiTreeUtil.getTopmostParentOfType(var, PsiClass.class); }