Mark Suppress Warnings
suggest changeIt is good practice to mark some warnings in your code. For example, a deprecated method may be needed for a test or for an old support library, and Lint will mark that code. To hide one warning category, use @SuppressWarnings. The javac name for this category is deprecation, not deprecated.
To ignore deprecation warnings, put that name in the annotation:
@SuppressWarnings("deprecation")
public void setAnotherColor (int newColor) {
getApplicationContext().getResources().getColor(newColor);
}
The annotation hides the named warning category. It does not hide every Lint or compiler warning.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents