Moar updates to JEP 277 - Enhanced Deprecation - warnings policy

Stuart Marks stuart.marks at
Tue Aug 23 17:27:02 UTC 2016

On 8/22/16 9:57 PM, Christoph Engelbert wrote:
> Nice work, anyhow I wonder if there’s any idea how to deal with @SuppressWarnings(“all”) even though I hope people are not really using it. Is it handled like “shoot yourself in the foot”? :-)

Hi Chris,

(I'm not sure that @SuppressWarnings("all") actually does anything. At least it 
doesn't do anything in javac. It might actually suppress all warnings in other 
compilers, though.)

In any case, my main approach here is to try to prevent errors and accidents. 
The scenario about deprecations being "upgraded" to have forRemoval=true is 
happening in 9, so we want to make sure people are warned about pending 
removals, even if they've previously suppressed deprecation warnings.

Now, if people deliberately shut off all warnings, then there isn't much we can 
do about that. So yes, we can't prevent people from shooting themselves in the 
foot, if they've deliberately disabled the safety.


More information about the jdk9-dev mailing list