From 1210135457185664b988d210999c752255479685 Mon Sep 17 00:00:00 2001 From: gounthar Date: Wed, 21 Feb 2024 09:50:34 +0100 Subject: [PATCH 1/4] fix(documentation): Fix typo. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7c702895..32cc6f2e 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Licensed under [MIT Licence]. About ----- -Allows you to perfrom maven release builds from within Jenkins. +Allows you to perform maven release builds from within Jenkins. Wiki and Info ------------- From 3fa20ba96b8c9fcc46513cc26a46f30a88f63328 Mon Sep 17 00:00:00 2001 From: gounthar Date: Wed, 21 Feb 2024 10:50:14 +0100 Subject: [PATCH 2/4] fix(spotbugs): Primitive field numberOfReleaseBuildsToKeep is public and 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 97] PA_PUBLIC_PRIMITIVE_ATTRIBUTE --- .../jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java b/src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java index f28a10bf..a0f0327a 100644 --- a/src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java +++ b/src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java @@ -94,7 +94,7 @@ public class M2ReleaseBuildWrapper extends BuildWrapper { public boolean selectAppendHudsonUsername = DescriptorImpl.DEFAULT_SELECT_APPEND_HUDSON_USERNAME; public boolean selectScmCredentials = DescriptorImpl.DEFAULT_SELECT_SCM_CREDENTIALS; - public 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) { From 9b48dd34e2fff95e91fae9c18714055ac5404fe5 Mon Sep 17 00:00:00 2001 From: gounthar Date: Wed, 21 Feb 2024 10:57:10 +0100 Subject: [PATCH 3/4] fix(spotbugs): Primitive field selectAppendHudsonUsername is public and 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 --- .../jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java b/src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java index a0f0327a..ff706419 100644 --- a/src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java +++ b/src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java @@ -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) { From 48593c108758f4f98c1a715d90866f10ed8aa7b6 Mon Sep 17 00:00:00 2001 From: gounthar Date: Wed, 21 Feb 2024 11:00:03 +0100 Subject: [PATCH 4/4] fix(spotbugs): Primitive field selectCustomScmCommentPrefix is public and 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 93] PA_PUBLIC_PRIMITIVE_ATTRIBUTE --- .../jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java b/src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java index ff706419..d546d8ec 100644 --- a/src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java +++ b/src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java @@ -90,7 +90,7 @@ public class M2ReleaseBuildWrapper extends BuildWrapper { private String releaseEnvVar = DescriptorImpl.DEFAULT_RELEASE_ENVVAR; private String releaseGoals = DescriptorImpl.DEFAULT_RELEASE_GOALS; private String dryRunGoals = DescriptorImpl.DEFAULT_DRYRUN_GOALS; - public boolean selectCustomScmCommentPrefix = DescriptorImpl.DEFAULT_SELECT_CUSTOM_SCM_COMMENT_PREFIX; + private boolean selectCustomScmCommentPrefix = DescriptorImpl.DEFAULT_SELECT_CUSTOM_SCM_COMMENT_PREFIX; private boolean selectAppendHudsonUsername = DescriptorImpl.DEFAULT_SELECT_APPEND_HUDSON_USERNAME; public boolean selectScmCredentials = DescriptorImpl.DEFAULT_SELECT_SCM_CREDENTIALS;