@Override
    public void visitTypeParameter(@NotNull PsiTypeParameter parameter) {
      super.visitTypeParameter(parameter);
      final String unqualifiedClassName = parameter.getName();
      PsiTypeParameterListOwner context = parameter.getOwner();
      if (context == null) {
        return;
      }
      final PsiResolveHelper resolveHelper = JavaPsiFacade.getInstance(parameter.getProject()).getResolveHelper();
      while (true) {
        if (context.hasModifierProperty(PsiModifier.STATIC)) {
          return;
        }
        context = PsiTreeUtil.getParentOfType(context, PsiTypeParameterListOwner.class);
        if (context == null) {
          return;
        }
        final PsiClass aClass = resolveHelper.resolveReferencedClass(unqualifiedClassName, context);
        if (aClass instanceof PsiTypeParameter typeParameter) {
          final PsiTypeParameterListOwner owner = typeParameter.getOwner();
          if (owner == null) {
            return;
          }
          if (!owner.equals(context)) {
            continue;
          }
        }
        if (aClass != null) {
          registerClassError(parameter, aClass);
          return;
        }
      }
    }
@Override
    public void visitTypeParameter(@NotNull PsiTypeParameter parameter)