diff --git a/src/main/java/org/openrewrite/java/security/PartialPathTraversalVulnerability.java b/src/main/java/org/openrewrite/java/security/PartialPathTraversalVulnerability.java index e8f3677..8c4b669 100644 --- a/src/main/java/org/openrewrite/java/security/PartialPathTraversalVulnerability.java +++ b/src/main/java/org/openrewrite/java/security/PartialPathTraversalVulnerability.java @@ -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) startCursor::getPathAsCursors) { Object cursorValue = cursor.getValue(); if (cursorValue instanceof J.Try) { diff --git a/src/main/java/org/openrewrite/java/security/UseFilesCreateTempDirectory.java b/src/main/java/org/openrewrite/java/security/UseFilesCreateTempDirectory.java index e482584..f43fbe2 100644 --- a/src/main/java/org/openrewrite/java/security/UseFilesCreateTempDirectory.java +++ b/src/main/java/org/openrewrite/java/security/UseFilesCreateTempDirectory.java @@ -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(); diff --git a/src/main/java/org/openrewrite/java/security/marshalling/SecureSnakeYamlConstructor.java b/src/main/java/org/openrewrite/java/security/marshalling/SecureSnakeYamlConstructor.java index 2e61114..c74edfd 100644 --- a/src/main/java/org/openrewrite/java/security/marshalling/SecureSnakeYamlConstructor.java +++ b/src/main/java/org/openrewrite/java/security/marshalling/SecureSnakeYamlConstructor.java @@ -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) startCursor::getPathAsCursors) { Object cursorValue = cursor.getValue();