I am using the com.google.common.net.MediaType
class from the Google Guava library and it is marked as @Beta
. I'd like to suppress warnings that this is marked as unstable.
What's the @SuppressWarnings
key do I need to use?
Annotation Type SuppressWarningsIndicates that the named compiler warnings should be suppressed in the annotated element (and in all program elements contained in the annotated element). Note that the set of warnings suppressed in a given element is a superset of the warnings suppressed in all containing elements.
@SuppressWarnings instruct the compiler to ignore or suppress, specified compiler warning in annotated element and all program elements inside that element. For example, if a class is annotated to suppress a particular warning, then a warning generated in a method inside that class will also be separated.
The @SuppressWarnings annotation disables certain compiler warnings. In this case, the warning about deprecated code ( "deprecation" ) and unused local variables or unused private methods ( "unused" ).
You can use @SuppressWarnings("UnstableApiUsage")
to suppress those warnings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With