<Swing Dev> RFR JDK 8: 8022190 Fix varargs lint warnings in the JDK
Alan Bateman
Alan.Bateman at oracle.com
Mon Aug 5 02:53:22 UTC 2013
On 04/08/2013 18:04, Joe Darcy wrote:
> Hello,
>
> Please review this fix for
>
> 8022190: Fix varargs lint warnings in the JDK
> http://cr.openjdk.java.net/~darcy/8022190.0/
>
> Full patch below.
>
> While the @SafeVarargs annotation generally suppresses compiler
> warnings about methods, when the varargs lint option is enabled, javac
> does some checking of the body to see if it is indeed safe. If it
> cannot be proven safe, javac will issue a warning.
>
> The the four cases below, javac is unable to determine that the
> methods are safe. The @SuppressWarnings("varargs") annotations added
> below help javac out in this regard.
>
> Thanks,
>
> -Joe
This looks okay to me (although I have to admit that I initially
scratched my head as to why the @SafeVarargs wasn't enough).
-Alan.
More information about the swing-dev
mailing list