mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-142478 ("Contents of collection are updated, but never queried" inspection fails to count toArray() as query)
This commit is contained in:
+1
-1
@@ -45,7 +45,7 @@ public class MismatchedCollectionQueryUpdateInspectionBase extends BaseInspectio
|
||||
@SuppressWarnings("PublicField")
|
||||
public final ExternalizableStringSet queryNames =
|
||||
new ExternalizableStringSet("compute", "copyInto", "drainTo", "forEach", "parallelStream", "propertyNames", "replaceAll", "save",
|
||||
"store", "stream", "write");
|
||||
"store", "stream", "toArray", "write");
|
||||
@SuppressWarnings("PublicField")
|
||||
public final ExternalizableStringSet updateNames =
|
||||
new ExternalizableStringSet("add", "clear", "compute", "drainTo", "insert", "load", "offer", "poll", "push", "put", "remove", "replace",
|
||||
|
||||
+6
-1
@@ -321,4 +321,9 @@ class EnumConstant {
|
||||
myPatterns = patterns;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
class ToArray {{
|
||||
List list = new ArrayList();
|
||||
list.add("A thing");
|
||||
list.toArray(new Object[1]);
|
||||
}}
|
||||
Reference in New Issue
Block a user