accept all as suppress for all (IDEA-85806)

This commit is contained in:
Anna Kozlova
2012-05-11 21:08:29 +04:00
parent 4bc1be41c0
commit e768be236b
3 changed files with 3 additions and 3 deletions
@@ -137,7 +137,7 @@ public class RedundantSuppressInspection extends GlobalInspectionTool{
String idsString = SuppressManager.getInstance().getSuppressedInspectionIdsIn(owner);
if (idsString != null && idsString.length() != 0) {
List<String> ids = StringUtil.split(idsString, ",");
if (IGNORE_ALL && ids.contains(SuppressionUtil.ALL)) return;
if (IGNORE_ALL && (ids.contains(SuppressionUtil.ALL) || ids.contains(SuppressionUtil.ALL.toLowerCase()))) return;
Collection<String> suppressed = suppressedScopes.get(owner);
if (suppressed == null) {
suppressed = ids;
@@ -58,7 +58,7 @@ public class SuppressionUtil {
for (@NonNls String id : ids) {
@NonNls String trim = id.trim();
if (trim.equals(inspectionToolID) || trim.equals(ALL)) return true;
if (trim.equalsIgnoreCase(ALL)) return true;
}
return false;
}
@@ -255,7 +255,7 @@ public abstract class RefElementImpl extends RefEntityImpl implements RefElement
public boolean isSuppressed(final String toolId) {
if (mySuppressions != null) {
for (@NonNls String suppression : mySuppressions) {
if (suppression.equals(toolId) || suppression.equals(SuppressionUtil.ALL)){
if (suppression.equalsIgnoreCase(SuppressionUtil.ALL)){
return true;
}
}