From f3df02e2e15bde03a5da42b9302c2680e36447e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Schn=C3=A9ider?= Date: Thu, 10 Aug 2023 13:31:08 +0000 Subject: [PATCH] refactor: Common static analysis issues Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.staticanalysis.CommonStaticAnalysis?organizationId=T3BlblJld3JpdGU%3D Co-authored-by: Moderne --- src/main/java/org/openrewrite/jenkins/AddPluginsBom.java | 3 ++- src/main/java/org/openrewrite/jenkins/CreateIndexJelly.java | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/openrewrite/jenkins/AddPluginsBom.java b/src/main/java/org/openrewrite/jenkins/AddPluginsBom.java index 4f7ebcd..f082482 100644 --- a/src/main/java/org/openrewrite/jenkins/AddPluginsBom.java +++ b/src/main/java/org/openrewrite/jenkins/AddPluginsBom.java @@ -163,7 +163,8 @@ public Xml visitTag(Xml.Tag tag, ExecutionContext executionContext) { @Value static class Artifact { - String groupId, artifactId; + String groupId; + String artifactId; } static class Scanned { diff --git a/src/main/java/org/openrewrite/jenkins/CreateIndexJelly.java b/src/main/java/org/openrewrite/jenkins/CreateIndexJelly.java index 139c3a0..8fe5f39 100644 --- a/src/main/java/org/openrewrite/jenkins/CreateIndexJelly.java +++ b/src/main/java/org/openrewrite/jenkins/CreateIndexJelly.java @@ -101,7 +101,9 @@ public Tree visit(@Nullable Tree tree, ExecutionContext executionContext) { @Value private static class DescribedPlugin { - String artifactId, indexJellyPath, pomDescription; + String artifactId; + String indexJellyPath; + String pomDescription; String contents() { String desc = pomDescription.isEmpty() ? artifactId : pomDescription;