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 final String
    This check points out potential issues when operating in a concurrent context
    static final String
    This check detects code that may technically be working within a limited domain, but is fragile, or violates generally-accepted assumptions of behavior.
    static final String
    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 final String
    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 final String
    This check performs a refactoring, for example migrating to a new version of an API.
    static final String
    This check points out a coding pattern that, while functional, has an easier-to-read or faster alternative.
    static final String
    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.
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • 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() of BugPattern.SeverityLevel.ERROR also has this tag.

      See Also:
    • 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 an interface).

      See Also:
    • 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:
    • 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:
    • CONCURRENCY

      public static final String CONCURRENCY
      This check points out potential issues when operating in a concurrent context

      The 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:
    • 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:
    • REFACTORING

      public static final String REFACTORING
      This check performs a refactoring, for example migrating to a new version of an API.
      See Also: