Annotation Type SuppressFBWarnings


  • @Retention(CLASS)
    public @interface SuppressFBWarnings
    Used to suppress FindBugs warnings. It should be used instead of SuppressWarnings to avoid conflicts with SuppressWarnings.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String justification
      Optional documentation of the reason why the warning is suppressed
      SuppressMatchType matchType
      By default SuppressFBWarnings annotations suppress bugs by prefix, for instance @SuppressFBWarnings(value = "EI_EXPO", justification = "It's OK") will suppress bugs of type EI_EXPOSE_REP and EI_EXPOSE_REP2.
      java.lang.String[] value
      The set of FindBugs warnings that are to be suppressed in annotated element.
    • Element Detail

      • value

        java.lang.String[] value
        The set of FindBugs warnings that are to be suppressed in annotated element. The value can be a bug category, kind or pattern.
        Default:
        {}
      • justification

        java.lang.String justification
        Optional documentation of the reason why the warning is suppressed
        Default:
        ""
      • matchType

        SuppressMatchType matchType

        By default SuppressFBWarnings annotations suppress bugs by prefix, for instance @SuppressFBWarnings(value = "EI_EXPO", justification = "It's OK") will suppress bugs of type EI_EXPOSE_REP and EI_EXPOSE_REP2.

        You might use @SuppressFBWarnings(value = "EI_EXPOSE_REP", justification = "It's OK", matchType=EXACT) to suppress EI_EXPOSE_REP, but not EI_EXPOSE_REP2.

        Regular expressions are also supported with matchType=REGEX.

        See Also:
        SuppressMatchType
        Default:
        edu.umd.cs.findbugs.annotations.SuppressMatchType.DEFAULT