mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
redundant suppressions: trim ids (IDEA-178473)
This commit is contained in:
+2
-1
@@ -141,7 +141,8 @@ public class RedundantSuppressInspectionBase extends GlobalInspectionTool {
|
||||
private void checkElement(final PsiElement owner) {
|
||||
String idsString = JavaSuppressionUtil.getSuppressedInspectionIdsIn(owner);
|
||||
if (idsString != null && !idsString.isEmpty()) {
|
||||
List<String> ids = StringUtil.split(idsString, ",");
|
||||
List<String> ids = new ArrayList<>();
|
||||
StringUtil.tokenize(idsString, "[, ]").forEach(ids::add);
|
||||
if (IGNORE_ALL && (ids.contains(SuppressionUtil.ALL) || ids.contains(SuppressionUtil.ALL.toLowerCase()))) return;
|
||||
Collection<String> suppressed = suppressedScopes.get(owner);
|
||||
if (suppressed == null) {
|
||||
|
||||
@@ -4,7 +4,7 @@ class S {
|
||||
public void f() {
|
||||
//noinspection HardCodedStringLiteral
|
||||
String s=null;
|
||||
//noinspection HardCodedStringLiteral
|
||||
//noinspection unused, HardCodedStringLiteral
|
||||
String s2="sssssss";
|
||||
}
|
||||
@SuppressWarnings({"HardCodedStringLiteral"})
|
||||
|
||||
Reference in New Issue
Block a user