From 1b80a5e233384072958c0f1495dc359d5a5b557c Mon Sep 17 00:00:00 2001 From: Liam Miller-Cushon Date: Wed, 8 Mar 2023 11:31:21 -0800 Subject: [PATCH] Add more detailed suppression documentation to Finalize PiperOrigin-RevId: 515094442 --- docs/bugpattern/Finalize.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/bugpattern/Finalize.md b/docs/bugpattern/Finalize.md index 4022df3fa92..74ff3e6acbe 100644 --- a/docs/bugpattern/Finalize.md +++ b/docs/bugpattern/Finalize.md @@ -13,3 +13,12 @@ The [Google Java Style Guide ยง6.4][style] states: [ej3e-8]: https://books.google.com/books?id=BIpDDwAAQBAJ [style]: https://google.github.io/styleguide/javaguide.html#s6.4-finalizers + +## Suppression + +Suppress false positives by adding the suppression annotation to the enclosing +element: + +```java +@SuppressWarnings("Finalize") // TODO(user): remove overrides of finalize +```