mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
IDEA-69795 (Quickfix "Remove explicit array creation" breaks code)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
<problem>
|
||||
<file>Test.java</file>
|
||||
<line>10</line>
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Redundant array creation</problem_class>
|
||||
<description>Redundant array creation for calling varargs method</description>
|
||||
</problem>
|
||||
</problems>
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
class Test {
|
||||
class A {}
|
||||
class B extends A {}
|
||||
|
||||
void f() {
|
||||
B b = new B();
|
||||
C<A> l = asC(new A[]{b});
|
||||
A a = new A();
|
||||
C<A> m = asC(new A[]{a});
|
||||
}
|
||||
|
||||
public static <T> C<T> asC(T... ts) {
|
||||
return null;
|
||||
}
|
||||
|
||||
class C<T> {}
|
||||
}
|
||||
Reference in New Issue
Block a user