|
Java example source code file (VarargsWarn.java)
The VarargsWarn.java Java example source code/* * @test /nodynamiccopyright/ * @bug 8019340 * @summary varargs-related warnings are meaningless on signature-polymorphic methods such as MethodHandle.invokeExact * * @compile/fail/ref=VarargsWarn.out -XDrawDiagnostics -Werror VarargsWarn.java */ import java.lang.invoke.*; class VarargsWarn { void test(MethodHandle mh) throws Throwable { mh.invokeExact((Integer[])null); mh.invoke((Integer[])null); mh.invokeWithArguments((Integer[])null); //not a sig poly method - warning here! } } Other Java examples (source code examples)Here is a short list of links related to this Java VarargsWarn.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.