Class BugPattern.StandardTags
- java.lang.Object
-
- com.google.errorprone.BugPattern.StandardTags
-
- Enclosing class:
- BugPattern
public static final class BugPattern.StandardTags extends Object
A collection of standardized tags that can be applied to BugPatterns.
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONCURRENCY
This check points out potential issues when operating in a concurrent contextstatic String
FRAGILE_CODE
This check detects code that may technically be working within a limited domain, but is fragile, or violates generally-accepted assumptions of behavior.static String
LIKELY_ERROR
This check, for reasons of backwards compatibility or difficulty in cleaning up, should be considered very likely to represent a real error in the vast majority (>99.9%
) of cases, but couldn't otherwise be turned on as an ERROR.static String
PERFORMANCE
This check detects a potential performance issue, where an easily-identifiable replacement for the code being made will always result in a net positive performance improvement.static String
REFACTORING
This check performs a refactoring, for example migrating to a new version of an API.static String
SIMPLIFICATION
This check points out a coding pattern that, while functional, has an easier-to-read or faster alternative.static String
STYLE
This check detects a coding pattern that is valid within the Java language and doesn't represent a runtime defect, but is otherwise discouraged for reasons of consistency within a project or ease of understanding by other programmers.
-
-
-
Field Detail
-
LIKELY_ERROR
public static final String LIKELY_ERROR
This check, for reasons of backwards compatibility or difficulty in cleaning up, should be considered very likely to represent a real error in the vast majority (>99.9%
) of cases, but couldn't otherwise be turned on as an ERROR.Systems trying to determine the set of likely errors from a collection of BugPatterns should act as if any BugPattern with
BugPattern.severity()
ofBugPattern.SeverityLevel.ERROR
also has this tag.- See Also:
- Constant Field Values
-
STYLE
public static final String STYLE
This check detects a coding pattern that is valid within the Java language and doesn't represent a runtime defect, but is otherwise discouraged for reasons of consistency within a project or ease of understanding by other programmers.Checks using this tag should limit their replacements to those that don't change the behavior of the code (for example: adding clarifying parentheses, reordering modifiers in a single declaration, removing implicit modifiers like
public
for members in aninterface
).- See Also:
- Constant Field Values
-
PERFORMANCE
public static final String PERFORMANCE
This check detects a potential performance issue, where an easily-identifiable replacement for the code being made will always result in a net positive performance improvement.- See Also:
- Constant Field Values
-
FRAGILE_CODE
public static final String FRAGILE_CODE
This check detects code that may technically be working within a limited domain, but is fragile, or violates generally-accepted assumptions of behavior.Examples: DefaultCharset, where code implicitly uses the JVM default charset, will work in circumstances where data being fed to the system happens to be compatible with the Charset, but breaks down if fed data outside.
- See Also:
- Constant Field Values
-
CONCURRENCY
public static final String CONCURRENCY
This check points out potential issues when operating in a concurrent contextThe code may work fine when accessed by 1 thread at a time, but may have some unintended behavior when running in multiple threads.
- See Also:
- Constant Field Values
-
SIMPLIFICATION
public static final String SIMPLIFICATION
This check points out a coding pattern that, while functional, has an easier-to-read or faster alternative.- See Also:
- Constant Field Values
-
REFACTORING
public static final String REFACTORING
This check performs a refactoring, for example migrating to a new version of an API.- See Also:
- Constant Field Values
-
-