2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2015-05-15 08:28:43 +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
|
|
|
|
*
|
2009-05-28 05:34:43 +00:00
|
|
|
* @compile Warn2.java
|
2015-05-15 08:28:43 +00:00
|
|
|
* @compile/fail/ref=Warn2.out -XDrawDiagnostics -Werror Warn2.java
|
2009-05-28 05:34:43 +00:00
|
|
|
* @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) {}
|
|
|
|
|
2023-01-17 04:43:40 +00:00
|
|
|
public static void meth() {
|
2007-12-01 00:00:00 +00:00
|
|
|
f("foo", null);
|
|
|
|
}
|
|
|
|
}
|