Conflicting inspections on passing primitive arrays to Object vararg methods
已回答
Problem description:
If I pass a primitive array to a method that accepts `Object…`, IntelliJ IDEA will suggest casting the argument to `Object`. However, if I do that, the IDE will highlight the cast as redundant. I simply can't make the IDE happy.
Steps to reproduce:
```java
import org.junit.jupiter.api.Test;
public class GenericTest {
@Test
public void varargTest() {
int[] ints = new int[]{1, 2, 3};
doSomething(ints); // inspection shown with and without cast to Object
}
void doSomething(Object... args) {}
}
```
Environment:
Windows 10
请先登录再写评论。
Hi Nad,
I reproduced the problem and filed it as https://youtrack.jetbrains.com/issue/IDEA-370702
Please follow the progress in the ticket.
Do I have permission to view the issue? It doesn't seem so
Sorry, the link was broken for some reason. I fixed it, please check again.