mirror of
https://github.com/jlengrand/error-prone-support.git
synced 2026-03-10 15:49:33 +00:00
1.0 KiB
1.0 KiB
layout, title, parent, nav_order
| layout | title | parent | nav_order |
|---|---|---|---|
| default | NestedOptionals | Bug Patterns | 1 |
NestedOptionals
FragileCode
${EXTRA_DOCS}
Samples
```java public static void sample() {} ```
View source code on GitHubNestedOptionals
Avoid nesting `Optional`s inside `Optional`s; the resultant code is hard to reason about
| Severity | WARNING |
| Tags | FragileCode |
Suppression
Suppress false positives by adding the suppression annotation @SuppressWarnings("NestedOptionals") to the enclosing element.