Skip to content

Commit

Permalink
Suppress new (self-check) warning in two spots
Browse files Browse the repository at this point in the history
  • Loading branch information
Venorcis committed Aug 17, 2022
1 parent 411c01f commit 9dab86c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ private static Optional<SuggestedFix.Builder> constructMethodRef(
return constructFix(lambdaExpr, lhsType.tsym, subTree.getIdentifier());
}

@SuppressWarnings("NestingOptionals")
private static Optional<Optional<Name>> matchArguments(
LambdaExpressionTree lambdaExpr, MethodInvocationTree subTree) {
ImmutableList<Name> expectedArguments = getVariables(lambdaExpr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ Optional<R> after(
/** Prefer {@link Optional#or(Supplier)} over more verbose alternatives. */
abstract static class OptionalOrOtherOptional<T> {
@BeforeTemplate
@SuppressWarnings("NestingOptionals")
Optional<T> before(Optional<T> optional1, Optional<T> optional2) {
// XXX: Note that rewriting the first and third variant will change the code's behavior if
// `optional2` has side-effects.
Expand Down

0 comments on commit 9dab86c

Please sign in to comment.