Skip to content

Commit

Permalink
Latest docs on successful build 6602 auto-pushed to gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
copybara-service[bot] committed Aug 26, 2024
1 parent 77a23e2 commit 7d6f096
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions bugpattern/WithSignatureDiscouraged.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@ To make changes, edit the @BugPattern annotation or the explanation in docs/bugp
-->


## The problem
`withSignature` replies on the string representation of internal classes in the
javac implementation. Those string representations are not necessarily stable
across versions of javac, and they can change when a method is annotated with
type-use annotations.

Additionally, `withSignature` currently has at least one undocumented behavioral
quirk.

The most reasonable use case for `withSignature` is for methods that declare or
use type variables, which are difficult or impossible to express with the rest
of the `MethodMatchers` API. Still, where practical, prefer to write your own
matching code instead of using `withSignature`.

## Suppression
Suppress false positives by adding the suppression annotation `@SuppressWarnings("WithSignatureDiscouraged")` to the enclosing element.

0 comments on commit 7d6f096

Please sign in to comment.