From 9ab5858c0664bd97d86c48248aefd9847b6980c4 Mon Sep 17 00:00:00 2001 From: ghm Date: Mon, 28 Oct 2024 07:37:51 -0700 Subject: [PATCH] Document our exciting Matches/NotMatches discoveries on @Placeholder. PiperOrigin-RevId: 690605162 --- .../google/errorprone/refaster/annotation/Placeholder.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/main/java/com/google/errorprone/refaster/annotation/Placeholder.java b/core/src/main/java/com/google/errorprone/refaster/annotation/Placeholder.java index 76baaca0039..4350b552842 100644 --- a/core/src/main/java/com/google/errorprone/refaster/annotation/Placeholder.java +++ b/core/src/main/java/com/google/errorprone/refaster/annotation/Placeholder.java @@ -79,6 +79,10 @@ * must contain references to all arguments that are passed to them -- except * those corresponding to parameters annotated with {@link MayOptionallyUse}. * + *

Note that {@link Matches} and {@link NotMatches} can be applied to placeholder methods, but, + * and this is a serious health warning, those predicates will only be matched if + * the placeholder method is used as an expression, not a statement. + * * @author lowasser@google.com (Louis Wasserman) */ @Target(ElementType.METHOD)