private static HighlightInfo.Builder checkSimpleCatchParameter(@NotNull PsiParameter parameter,
                                                         @NotNull Collection<? extends PsiClassType> thrownTypes,
                                                         @NotNull PsiClassType caughtType) {
    if (ExceptionUtil.isUncheckedExceptionOrSuperclass(caughtType)) return null;

    for (PsiClassType exceptionType : thrownTypes) {
      if (exceptionType.isAssignableFrom(caughtType) || caughtType.isAssignableFrom(exceptionType)) return null;
    }

    String description = JavaErrorBundle.message("exception.never.thrown.try", JavaHighlightUtil.formatType(caughtType));
    HighlightInfo.Builder errorResult =
      HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR).range(parameter).descriptionAndTooltip(description);
    IntentionAction action = getFixFactory().createDeleteCatchFix(parameter);
    errorResult.registerFix(action, null, null, null, null);
    return errorResult;
  }
private static HighlightInfo.Builder checkSimpleCatchParameter(@NotNull PsiParameter parameter,
                                                         @NotNull Collection<? extends PsiClassType> thrownTypes,
                                                         @NotNull PsiClassType caughtType)