Reputation: 53
is there any option to suppress deprecated warnings only for certain methods?
Thanks
Upvotes: 1
Views: 2555
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
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