TaskID
TaskID

Reputation: 53

IntelliJ Suppress Deprecated Warning For Certain Method?

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

Thanks

Upvotes: 1

Views: 2555

Answers (2)

YourHelper
YourHelper

Reputation: 735

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...

Upvotes: 4

MrBorder
MrBorder

Reputation: 369

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

Upvotes: 0

Related Questions