We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c124fc6 commit 8c476e7Copy full SHA for 8c476e7
check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java
@@ -440,7 +440,8 @@ public static ExpressionTree stripParentheses(ExpressionTree tree) {
440
* Given a TreePath, finds the first enclosing node of the given type and returns the path from
441
* the enclosing node to the top-level {@code CompilationUnitTree}.
442
*/
443
- public static <T> TreePath findPathFromEnclosingNodeToTopLevel(TreePath path, Class<T> klass) {
+ public static <T> @Nullable TreePath findPathFromEnclosingNodeToTopLevel(
444
+ TreePath path, Class<T> klass) {
445
if (path != null) {
446
do {
447
path = path.getParentPath();
0 commit comments