String (Object... infos) { final List<SmartTypePointer> typesMasked = (List<SmartTypePointer>)infos[0]; final PsiType type = typesMasked.get(0).getType(); String typesMaskedString = type != null ? type.getPresentableText() : ""; if (typesMasked.size() == 1) { return InspectionGadgetsBundle.message( "overly.broad.throws.clause.problem.descriptor1", typesMaskedString); } else { final int lastTypeIndex = typesMasked.size() - 1; for (int i = 1; i < lastTypeIndex; i++) { final PsiType psiType = typesMasked.get(i).getType(); if (psiType != null) { typesMaskedString += ", "; typesMaskedString += psiType.getPresentableText(); } } final PsiType psiType = typesMasked.get(lastTypeIndex).getType(); final String lastTypeString = psiType != null ? psiType.getPresentableText() : ""; return InspectionGadgetsBundle.message("overly.broad.throws.clause.problem.descriptor2", typesMaskedString, lastTypeString); } }