jdk-24/test/langtools/tools/javac/varargs/Warn2.java

21 lines
460 B
Java
Raw Normal View History

2007-12-01 00:00:00 +00:00
/*
* @test /nodynamiccopyright/
2007-12-01 00:00:00 +00:00
* @bug 5024518
* @summary need warning if varargs argument isn't boxed
* @author gafter
*
* @compile Warn2.java
* @compile/fail/ref=Warn2.out -XDrawDiagnostics -Werror Warn2.java
* @compile -Werror -Xlint:none Warn2.java
2007-12-01 00:00:00 +00:00
*/
package varargs.warn2;
class T {
static void f(String fmt, Object... args) {}
public static void meth() {
2007-12-01 00:00:00 +00:00
f("foo", null);
}
}