@Override
  public CommonProblemDescriptor @Nullable [] checkPackage(@NotNull RefPackage refPackage,
                                                           @NotNull AnalysisScope analysisScope,
                                                           @NotNull InspectionManager inspectionManager,
                                                           @NotNull GlobalInspectionContext globalInspectionContext) {
    boolean isExceptionPackage = ReadAction.nonBlocking(() -> {
      final String packageName = refPackage.getQualifiedName();
      final Project project = globalInspectionContext.getProject();
      final PsiPackage aPackage = JavaPsiFacade.getInstance(project).findPackage(packageName);
      if (aPackage == null || aPackage.getSubPackages().length > 0) {
        return false;
      }
      final PsiClass[] classes = aPackage.getClasses(GlobalSearchScope.projectScope(project));
      if (classes.length == 0) {
        return false;
      }
      for (PsiClass aClass : classes) {
        if (!InheritanceUtil.isInheritor(aClass, CommonClassNames.JAVA_LANG_THROWABLE) &&
            !TestFrameworks.getInstance().isTestClass(aClass)) {
          return false;
        }
      }
      return true;
    }).executeSynchronously();
    if (!isExceptionPackage) return null;
    final String errorString = InspectionGadgetsBundle.message("exception.package.problem.descriptor", refPackage.getQualifiedName());
    return new CommonProblemDescriptor[]{inspectionManager.createProblemDescriptor(errorString)};
  }
@Override
  public CommonProblemDescriptor @Nullable [] checkPackage(@NotNull RefPackage refPackage,
                                                           @NotNull AnalysisScope analysisScope,
                                                           @NotNull InspectionManager inspectionManager,
                                                           @NotNull GlobalInspectionContext globalInspectionContext)