@Override
    public void visitField(@NotNull PsiField field) {
      if (field.hasModifierProperty(PsiModifier.STATIC)) {
        return;
      }
      if (!field.hasModifierProperty(PsiModifier.FINAL)) {
        return;
      }
      final PsiExpression initializer = field.getInitializer();
      if (initializer == null) {
        return;
      }
      if (SideEffectChecker.mayHaveSideEffects(initializer)) {
        return;
      }
      final PsiType type = field.getType();
      if (!ClassUtils.isImmutable(type) && 
          Mutability.fromDfType(CommonDataflow.getDfType(initializer)) != Mutability.UNMODIFIABLE) {
        return;
      }
      final PsiClass containingClass = field.getContainingClass();
      if (containingClass != null
          && !containingClass.hasModifierProperty(PsiModifier.STATIC)
          && containingClass.getContainingClass() != null
          && !PsiUtil.isAvailable(JavaFeature.INNER_STATICS, containingClass)
          && !PsiUtil.isCompileTimeConstant(field)) {
        // inner class cannot have static declarations in earlier Java versions
        return;
      }
      if (UnusedSymbolUtil.isImplicitWrite(field)) {
        return;
      }
      if (containingClass instanceof PsiAnonymousClass &&
          !PsiUtil.isAvailable(JavaFeature.INNER_STATICS, containingClass) &&
          !PsiUtil.isCompileTimeConstant(field)) {
        return;
      }
      if (!canBeStatic(initializer)) {
        return;
      }
      if (isIdentitySensitive(field)) {
        return;
      }
      registerFieldError(field);
    }
@Override
    public void visitField(@NotNull PsiField field)