Skip to content

Commit

Permalink
refactor: Common static analysis issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jkschneider and TeamModerne committed Dec 6, 2023
1 parent c1c0ebd commit fb4c00d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class AddSnakeYamlDependencyIfNeeded extends ScanningRecipe<AddSnakeYamlD
private final List<Recipe> recipeList = new ArrayList<>();

static class YamlAccumulator {
boolean usingYamlConfig = false;
boolean usingYamlConfig;
}

public AddSnakeYamlDependencyIfNeeded() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class AddTestResourcesClientDependencyIfNeeded extends ScanningRecipe<Add
private final List<Recipe> recipeList = new ArrayList<>();

static class Scanned {
boolean isTestResourcesEnabled = false;
boolean isTestResourcesEnabled;
}

public AddTestResourcesClientDependencyIfNeeded() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static Optional<String> getNewerVersion(String versionPattern, String cur
VersionComparator versionComparator = Semver.validate(versionPattern, null).getValue();
assert versionComparator != null;

String groupId = Semver.majorVersion(versionPattern).equals("4") ? V4_GROUP_ID : GROUP_ID;
String groupId = "4".equals(Semver.majorVersion(versionPattern)) ? V4_GROUP_ID : GROUP_ID;

MavenMetadata mavenMetadata = new MavenPomDownloader(emptyMap(), ctx)
.downloadMetadata(new GroupArtifact(groupId, ARTIFACT_ID), null, emptyList());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class UpdateSecurityYamlIfNeeded extends Recipe {
"bearer:\n" +
" enabled:";

private final String TOKEN_PATH = "$.micronaut.security.token";
private static final String TOKEN_PATH = "$.micronaut.security.token";

@Override
public String getDisplayName() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import org.openrewrite.InMemoryExecutionContext;
import org.openrewrite.maven.MavenDownloadingException;

public class MicronautRewriteTestVersions {
public final class MicronautRewriteTestVersions {
private static final String MN_2_VERSION;
private static final String MN_3_VERSION;
private static final String MN_4_VERSION;
Expand Down

0 comments on commit fb4c00d

Please sign in to comment.