JDK 9 RFR of JDK-7196160: Project Coin: allow @SafeVarargs on private methods

Joe Darcy joe.darcy at oracle.com
Tue Jun 17 05:46:17 UTC 2014


Hello,

Please review my draft fix for

     JDK-7196160: Project Coin: allow @SafeVarargs on private methods
     http://cr.openjdk.java.net/~darcy/7196160.0/

(This is one of the possible refinements to Project Coin described in 
JEP JDK-8042880: Milling Project Coin: softening some rough edges.)

The changes are pretty straightforward. If an @SafeVarargs annotation is 
applied inappropriately, a source-level dependent message is produced. 
This could be enhanced slightly to recognize @SafeVarargs on a private 
method output a "use -source 9 or higher for @SafeVarargs ..." message.

All regression tests pass after this change.

Thanks,

-Joe


More information about the compiler-dev mailing list