test/tools/javac/meth/XlintWarn.java

changeset 810
15484cb7e5ae
parent 742
fdc67f5170e9
child 820
2d5aff89aaa3
equal deleted inserted replaced
809:e63b1f8341ce 810:15484cb7e5ae
21 * questions. 21 * questions.
22 */ 22 */
23 23
24 /* 24 /*
25 * @test 25 * @test
26 * @bug 6999067 26 * @bug 6999067 7010194
27 * @summary cast for invokeExact call gets redundant cast to <type> warnings 27 * @summary cast for invokeExact call gets redundant cast to <type> warnings
28 * @author mcimadamore 28 * @author mcimadamore
29 * 29 *
30 * @compile -Werror -Xlint:cast XlintWarn.java 30 * @compile -Werror -Xlint:cast XlintWarn.java
31 */ 31 */
32 32
33 import java.dyn.*; 33 import java.dyn.*;
34 34
35 class XlintWarn { 35 class XlintWarn {
36 void test(MethodHandle mh) throws Throwable { 36 void test(MethodHandle mh) throws Throwable {
37 int i1 = (int)mh.invoke(); 37 int i1 = (int)mh.invokeExact();
38 int i2 = (int)mh.invokeExact(); 38 int i2 = (int)mh.invokeVarargs();
39 int i3 = (int)mh.invokeVarargs();
40 int i4 = (int)InvokeDynamic.test();
41 } 39 }
42 } 40 }

mercurial