简体   繁体   中英

IntelliJ Suppress Deprecated Warning For Certain Method?

is there any option to suppress deprecated warnings only for certain methods?

Thanks

Put this annotation on your method:

@SuppressWarnings( "deprecation" )

To suppress all warnings you can do

@SuppressWarnings("all")

but this is not suggested because these warning alaways exist for a reason...

You can annotate the methods with the @SuppressWarnings("deprecated") annotation. read more about that here: https://docs.oracle.com/javase/7/docs/api/java/lang/SuppressWarnings.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM