On Thu, 17 Dec 2020 10:36:17 GMT, Rémi Forax <github.com+828220+fo...@openjdk.org> wrote:
>> Looks like I've found the original ticket: >> https://bugs.openjdk.java.net/browse/JDK-8193031 > > Apart from the @SuppressWarnings, this looks good to me. > And i like the irony of this. Hi all, According to the document of [SafeVarargs](https://docs.oracle.com/en/java/javase/15/docs/api/java.base/java/lang/SafeVarargs.html). > Compilers are encouraged to issue warnings when this annotation type is > applied to a method or constructor declaration where: > The body of the method or constructor declaration performs potentially unsafe > operations, such as an assignment to an element of the variable arity > parameter's array that generates an unchecked warning. The `SafeVarargs` may not suppress the warning of this assignment and the `SuppressWarnings` may be necessary. If you still think it is the bug of compiler. I suggest that you move the bug discussion to the compiler-...@openjdk.java.net to solve the bug as soon as possible. ------------- PR: https://git.openjdk.java.net/jdk/pull/1764