@SuppressWarnings注解默认字符串有哪些?
@SuppressWarnings注解默认字符串有哪些?
allto suppress all warningsboxingto suppress warnings relative to boxing/unboxing operationscastto suppress warnings relative to cast operationsdep-annto suppress warnings relative to deprecated annotationdeprecationto suppress warnings relative to deprecationfallthroughto suppress warnings relative to missing breaks in switch statementsfinallyto suppress warnings relative to finally block that don’t returnhidingto suppress warnings relative to locals that hide variableincomplete-switchto suppress warnings relative to missing entries in a switch statement (enum case)nlsto suppress warnings relative to non-nls string literalsnullto suppress warnings relative to null analysisrawtypesto suppress warnings relative to un-specific types when using generics on class paramsrestrictionto suppress warnings relative to usage of discouraged or forbidden referencesserialto suppress warnings relative to missing serialVersionUID field for a serializable classstatic-accessto suppress warnings relative to incorrect static accesssynthetic-accessto suppress warnings relative to unoptimized access from inner classesuncheckedto suppress warnings relative to unchecked operationsunqualified-field-accessto suppress warnings relative to field access unqualifiedunusedto suppress warnings relative to unused code
TIP: For the folks that haven’t used @SuppressWarnings before, the syntax looks like this:

浙公网安备 33010602011771号