String (Object... infos) { final PsiExpression expression = (PsiExpression)infos[0]; if (expression instanceof PsiMethodCallExpression) { return InspectionGadgetsBundle.message("throwable.result.of.method.call.ignored.problem.descriptor"); } final String type = TypeUtils.expressionHasTypeOrSubtype(expression, CommonClassNames.JAVA_LANG_RUNTIME_EXCEPTION, CommonClassNames.JAVA_LANG_EXCEPTION, CommonClassNames.JAVA_LANG_ERROR); if (CommonClassNames.JAVA_LANG_RUNTIME_EXCEPTION.equals(type)) { return InspectionGadgetsBundle.message("throwable.instance.never.thrown.runtime.exception.problem.descriptor"); } else if (CommonClassNames.JAVA_LANG_EXCEPTION.equals(type)) { return InspectionGadgetsBundle.message("throwable.instance.never.thrown.checked.exception.problem.descriptor"); } else if (CommonClassNames.JAVA_LANG_ERROR.equals(type)) { return InspectionGadgetsBundle.message("throwable.instance.never.thrown.error.problem.descriptor"); } else { return InspectionGadgetsBundle.message("throwable.instance.never.thrown.problem.descriptor"); } }