Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,8 @@ public static ExpressionTree stripParentheses(ExpressionTree tree) {
* Given a TreePath, finds the first enclosing node of the given type and returns the path from
* the enclosing node to the top-level {@code CompilationUnitTree}.
*/
public static <T> TreePath findPathFromEnclosingNodeToTopLevel(TreePath path, Class<T> klass) {
public static <T> @Nullable TreePath findPathFromEnclosingNodeToTopLevel(
TreePath path, Class<T> klass) {
if (path != null) {
do {
path = path.getParentPath();
Expand Down