Skip to content

Commit

Permalink
refactor: Move @Nullable method annotations to the return type
Browse files Browse the repository at this point in the history
  • Loading branch information
jkschneider and TeamModerne committed Jul 16, 2024
1 parent 7b726bc commit 6ac8d10
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ static class ExpressionWithTry {
@Nullable J.Try maybeTryStatement;
}

@Nullable
private static J.Try findNearestRelevantTry(Cursor startCursor) {
private static @Nullable J.Try findNearestRelevantTry(Cursor startCursor) {
for (Cursor cursor : (Iterable<Cursor>) startCursor::getPathAsCursors) {
Object cursorValue = cursor.getValue();
if (cursorValue instanceof J.Try) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,7 @@ private static boolean isMethodForIdent(J.Identifier ident, InvocationMatcher in
return false;
}

@Nullable
private static J.Identifier getIdent(J createFileStatement) {
private static @Nullable J.Identifier getIdent(J createFileStatement) {
if (createFileStatement instanceof J.Assignment) {
J.Assignment assignment = (J.Assignment) createFileStatement;
return (J.Identifier) assignment.getVariable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,7 @@ private boolean isSnakeYamlType(@Nullable JavaType type) {
return isUnsafe.get();
}

@Nullable
private static Cursor getOuterMostExecutableBlock(Cursor startCursor) {
private static @Nullable Cursor getOuterMostExecutableBlock(Cursor startCursor) {
Cursor blockCursor = null;
for (Cursor cursor : (Iterable<Cursor>) startCursor::getPathAsCursors) {
Object cursorValue = cursor.getValue();
Expand Down

0 comments on commit 6ac8d10

Please sign in to comment.