Suspicious 'Collection.toArray()' call
Reports suspicious calls to
The following types of calls are considered suspicious:
when the type of the array argument is not the same as the array type to which the result is casted.
when the type of the array argument does not match the type parameter in the collection declaration.
IntelliJ IDEA 2023.3, Qodana for JVM 2023.3