mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
@SafeVarargs for java 9 (IDEA-132278)
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import java.util.List;
|
||||
|
||||
final class Test {
|
||||
@SafeVarargs
|
||||
private <T> void testPrivate(T... <warning descr="Parameter 'i' is never used">i</warning>){}
|
||||
|
||||
<error descr="@SafeVarargs is not allowed on non-final instance methods">@SafeVarargs</error>
|
||||
protected <T> void testProtected(T... <warning descr="Parameter 'i' is never used">i</warning>){} //but in final class
|
||||
|
||||
public static void main(String[] args) {
|
||||
new Test().testPrivate();
|
||||
new Test().testProtected();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user