Skip to content

Commit

Permalink
fix(spotbugs): Primitive field selectAppendHudsonUsername is public a…
Browse files Browse the repository at this point in the history
…nd set from inside the class

It makes it too exposed. Consider making it private to limit external accessibility. [org.jvnet.hudson.plugins.m2release.M2ReleaseBuildWrapper] At M2ReleaseBuildWrapper.java:[line 94] PA_PUBLIC_PRIMITIVE_ATTRIBUTE
  • Loading branch information
gounthar committed Feb 21, 2024
1 parent 3fa20ba commit 9b48dd3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ public class M2ReleaseBuildWrapper extends BuildWrapper {
private String releaseGoals = DescriptorImpl.DEFAULT_RELEASE_GOALS;
private String dryRunGoals = DescriptorImpl.DEFAULT_DRYRUN_GOALS;
public boolean selectCustomScmCommentPrefix = DescriptorImpl.DEFAULT_SELECT_CUSTOM_SCM_COMMENT_PREFIX;
public boolean selectAppendHudsonUsername = DescriptorImpl.DEFAULT_SELECT_APPEND_HUDSON_USERNAME;
private boolean selectAppendHudsonUsername = DescriptorImpl.DEFAULT_SELECT_APPEND_HUDSON_USERNAME;
public boolean selectScmCredentials = DescriptorImpl.DEFAULT_SELECT_SCM_CREDENTIALS;

private int numberOfReleaseBuildsToKeep = DescriptorImpl.DEFAULT_NUMBER_OF_RELEASE_BUILDS_TO_KEEP;
private int numberOfReleaseBuildsToKeep = DescriptorImpl.DEFAULT_NUMBER_OF_RELEASE_BUILDS_TO_KEEP;

@DataBoundConstructor
public M2ReleaseBuildWrapper(String releaseGoals, String dryRunGoals, boolean selectCustomScmCommentPrefix, boolean selectAppendHudsonUsername, boolean selectScmCredentials, String releaseEnvVar, String scmUserEnvVar, String scmPasswordEnvVar, int numberOfReleaseBuildsToKeep) {
Expand Down

0 comments on commit 9b48dd3

Please sign in to comment.