Skip to content

Commit 52453f0

Browse files
committed
Match UpgradeDependencyVersion field style: private final + explicit @Getter on displayName/description
1 parent b9c53cd commit 52453f0

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

src/main/java/org/openrewrite/java/dependencies/ChangeDependency.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,56 +32,58 @@ public class ChangeDependency extends ScanningRecipe<ChangeDependency.Accumulato
3232
@Option(displayName = "Old group ID",
3333
description = "The old group ID to replace. The group ID is the first part of a dependency coordinate 'com.google.guava:guava:VERSION'. Supports glob expressions.",
3434
example = "org.openrewrite.recipe")
35-
final String oldGroupId;
35+
private final String oldGroupId;
3636

3737
@Option(displayName = "Old artifact ID",
3838
description = "The old artifact ID to replace. The artifact ID is the second part of a dependency coordinate 'com.google.guava:guava:VERSION'. Supports glob expressions.",
3939
example = "rewrite-testing-frameworks")
40-
final String oldArtifactId;
40+
private final String oldArtifactId;
4141

4242
@Option(displayName = "New group ID",
4343
description = "The new group ID to use. Defaults to the existing group ID.",
4444
example = "corp.internal.openrewrite.recipe",
4545
required = false)
4646
@Nullable
47-
final String newGroupId;
47+
private final String newGroupId;
4848

4949
@Option(displayName = "New artifact ID",
5050
description = "The new artifact ID to use. Defaults to the existing artifact ID.",
5151
example = "rewrite-testing-frameworks",
5252
required = false)
5353
@Nullable
54-
final String newArtifactId;
54+
private final String newArtifactId;
5555

5656
@Option(displayName = "New version",
5757
description = "An exact version number or node-style semver selector used to select the version number.",
5858
example = "29.X",
5959
required = false)
6060
@Nullable
61-
final String newVersion;
61+
private final String newVersion;
6262

6363
@Option(displayName = "Version pattern",
6464
description = "Allows version selection to be extended beyond the original Node Semver semantics. So for example," +
6565
"Setting 'version' to \"25-29\" can be paired with a metadata pattern of \"-jre\" to select Guava 29.0-jre",
6666
example = "-jre",
6767
required = false)
6868
@Nullable
69-
final String versionPattern;
69+
private final String versionPattern;
7070

7171
@Option(displayName = "Override managed version",
7272
description = "If the new dependency has a managed version, this flag can be used to explicitly set the version on the dependency. The default for this flag is `false`.",
7373
required = false)
7474
@Nullable
75-
final Boolean overrideManagedVersion;
75+
private final Boolean overrideManagedVersion;
7676

7777
@Option(displayName = "Update dependency management",
7878
description = "Also update the dependency management section. The default for this flag is `true`.",
7979
required = false)
8080
@Nullable
81-
final Boolean changeManagedDependency;
81+
private final Boolean changeManagedDependency;
8282

83+
@Getter
8384
final String displayName = "Change Gradle or Maven dependency";
8485

86+
@Getter
8587
final String description = "Change the group ID, artifact ID, and/or the version of a specified Gradle or Maven dependency.";
8688

8789
@Override

0 commit comments

Comments
 (0)