From 0f841a5219832902dee3722531838875f3ce5d5b Mon Sep 17 00:00:00 2001 From: Kurt Alfred Kluever Date: Wed, 1 Jul 2026 07:10:37 -0700 Subject: [PATCH] PUBLIC: Add a note about getting the end position of a tree to `ASTHelpers.getStartPosition(Tree)`. PiperOrigin-RevId: 941075730 --- .../src/main/java/com/google/errorprone/util/ASTHelpers.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java b/check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java index c6f181f9223..a681f156778 100644 --- a/check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java +++ b/check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java @@ -1941,7 +1941,10 @@ private static ImmutableList extractTypes(@Nullable Type type) { } } - /** Returns the start position of the node. */ + /** + * Returns the start position of the node. To get the end position of a node, use {@link + * VisitorState#getEndPosition}. + */ public static int getStartPosition(Tree tree) { return ((JCTree) tree).getStartPosition(); }