From a25f524f0812a191b896318517f185828a0009b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Schn=C3=A9ider?= Date: Tue, 16 Jul 2024 22:28:46 +0000 Subject: [PATCH] refactor: Move `@Nullable` method annotations to the return type Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.staticanalysis.NullableOnMethodReturnType?organizationId=T3BlblJld3JpdGU%3D Co-authored-by: Moderne --- src/main/java/org/openrewrite/jenkins/Jenkins.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/org/openrewrite/jenkins/Jenkins.java b/src/main/java/org/openrewrite/jenkins/Jenkins.java index dffdbea..d6b7da9 100644 --- a/src/main/java/org/openrewrite/jenkins/Jenkins.java +++ b/src/main/java/org/openrewrite/jenkins/Jenkins.java @@ -36,8 +36,7 @@ class Jenkins { * @param sourceFile POM * @return jenkins-core's version if managed, otherwise null */ - @Nullable - public static String isJenkinsPluginPom(SourceFile sourceFile) { + public static @Nullable String isJenkinsPluginPom(SourceFile sourceFile) { return sourceFile.getMarkers() .findFirst(MavenResolutionResult.class) .map(mavenResolution -> mavenResolution.getPom().getManagedVersion("org.jenkins-ci.main",