Files
error-prone-support/docs/bugpatterns/NestedOptionals.md
2022-09-27 10:20:29 +02:00

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 GitHub

NestedOptionals

Avoid nesting `Optional`s inside `Optional`s; the resultant code is hard to reason about

SeverityWARNING
TagsFragileCode

Suppression

Suppress false positives by adding the suppression annotation @SuppressWarnings("NestedOptionals") to the enclosing element.