Skip to content

Commit 1fda009

Browse files
klueverError Prone Team
authored and
Error Prone Team
committed
Allow Optional params inside of a GraphWrapper.
PiperOrigin-RevId: 741216585
1 parent 69ea1ba commit 1fda009

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: core/src/main/java/com/google/errorprone/bugpatterns/NonApiType.java

+2
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,12 @@ public final class NonApiType extends BugChecker implements MethodTreeMatcher {
8989
// Optionals
9090
withPublicVisibility(
9191
isExactType("java.util.Optional"),
92+
NON_GRAPH_WRAPPER,
9293
"Avoid Optional parameters. " + OPTIONAL_AS_PARAM_LINK,
9394
ApiElementType.PARAMETER),
9495
withPublicVisibility(
9596
isExactType("com.google.common.base.Optional"),
97+
NON_GRAPH_WRAPPER,
9698
"Prefer a java.util.Optional instead. " + PREFER_JDK_OPTIONAL_LINK,
9799
ApiElementType.ANY),
98100

0 commit comments

Comments
 (0)