This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-release-plugin.git
commit 592521746774f31f48d9b17aac09a7f1818cae94 Author: Gary Gregory <[email protected]> AuthorDate: Wed Dec 3 17:33:26 2025 -0500 Make some classes final --- src/changes/changes.xml | 1 + .../release/plugin/mojos/CommonsDistributionDetachmentMojo.java | 2 +- .../commons/release/plugin/mojos/CommonsDistributionStagingMojo.java | 2 +- .../commons/release/plugin/mojos/CommonsSiteCompressionMojo.java | 2 +- .../commons/release/plugin/mojos/CommonsStagingCleanupMojo.java | 2 +- .../commons/release/plugin/velocity/HeaderHtmlVelocityDelegate.java | 4 ++-- .../commons/release/plugin/velocity/ReadmeHtmlVelocityDelegate.java | 4 ++-- .../release/plugin/stubs/DistributionDetachmentProjectStub.java | 4 ++-- .../release/plugin/velocity/ReadmeHtmlVelocityDelegateTest.java | 2 +- 9 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 8717cd6..d3a6a3d 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -27,6 +27,7 @@ <release version="1.9.2" date="YYYY-MM-DD" description="This is a feature and maintenance release. Java 8 or later is required."> <!-- FIX --> <action type="fix" dev="ggregory" due-to="Gary Gregory">Fix Apache RAT plugin console warnings.</action> + <action type="fix" dev="ggregory" due-to="Gary Gregory">Make some classes final.</action> <!-- ADD --> <!-- UPDATE --> <action type="update" dev="ggregory" due-to="Gary Gregory">Bump org.apache.commons:commons-parent from 85 to 93 #396, #399, #419, #420.</action> diff --git a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojo.java b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojo.java index 691a0c7..7d6f3ca 100644 --- a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojo.java +++ b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojo.java @@ -52,7 +52,7 @@ import org.apache.maven.project.MavenProject; defaultPhase = LifecyclePhase.VERIFY, threadSafe = true, aggregator = true) -public class CommonsDistributionDetachmentMojo extends AbstractMojo { +public final class CommonsDistributionDetachmentMojo extends AbstractMojo { /** * A list of "artifact types" in the Maven vernacular, to diff --git a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojo.java b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojo.java index 88a6bb8..cf96e8f 100644 --- a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojo.java +++ b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojo.java @@ -69,7 +69,7 @@ import org.apache.maven.settings.crypto.SettingsDecrypter; defaultPhase = LifecyclePhase.DEPLOY, threadSafe = true, aggregator = true) -public class CommonsDistributionStagingMojo extends AbstractMojo { +public final class CommonsDistributionStagingMojo extends AbstractMojo { /** The name of file generated from the README.vm velocity template to be checked into the dist svn repo. */ private static final String README_FILE_NAME = "README.html"; diff --git a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojo.java b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojo.java index bba994e..bcb7016 100644 --- a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojo.java +++ b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojo.java @@ -48,7 +48,7 @@ import org.apache.maven.plugins.annotations.Parameter; defaultPhase = LifecyclePhase.POST_SITE, threadSafe = true, aggregator = true) -public class CommonsSiteCompressionMojo extends AbstractMojo { +public final class CommonsSiteCompressionMojo extends AbstractMojo { /** * The working directory for the plugin which, assuming the maven uses the default diff --git a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsStagingCleanupMojo.java b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsStagingCleanupMojo.java index 6af15a6..afbb891 100644 --- a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsStagingCleanupMojo.java +++ b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsStagingCleanupMojo.java @@ -54,7 +54,7 @@ import org.apache.maven.settings.crypto.SettingsDecrypter; defaultPhase = LifecyclePhase.POST_CLEAN, threadSafe = true, aggregator = true) -public class CommonsStagingCleanupMojo extends AbstractMojo { +public final class CommonsStagingCleanupMojo extends AbstractMojo { /** * The {@link MavenProject} object is essentially the context of the maven build at diff --git a/src/main/java/org/apache/commons/release/plugin/velocity/HeaderHtmlVelocityDelegate.java b/src/main/java/org/apache/commons/release/plugin/velocity/HeaderHtmlVelocityDelegate.java index b3ea41f..6cce80b 100644 --- a/src/main/java/org/apache/commons/release/plugin/velocity/HeaderHtmlVelocityDelegate.java +++ b/src/main/java/org/apache/commons/release/plugin/velocity/HeaderHtmlVelocityDelegate.java @@ -30,12 +30,12 @@ import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader; * * @since 1.3 */ -public class HeaderHtmlVelocityDelegate { +public final class HeaderHtmlVelocityDelegate { /** * A builder class for instantiation of the {@link HeaderHtmlVelocityDelegate}. */ - public static class HeaderHtmlVelocityDelegateBuilder { + public static final class HeaderHtmlVelocityDelegateBuilder { /** * Private constructor so that we can have a proper builder pattern. diff --git a/src/main/java/org/apache/commons/release/plugin/velocity/ReadmeHtmlVelocityDelegate.java b/src/main/java/org/apache/commons/release/plugin/velocity/ReadmeHtmlVelocityDelegate.java index f5b9cba..45f96e3 100644 --- a/src/main/java/org/apache/commons/release/plugin/velocity/ReadmeHtmlVelocityDelegate.java +++ b/src/main/java/org/apache/commons/release/plugin/velocity/ReadmeHtmlVelocityDelegate.java @@ -31,11 +31,11 @@ import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader; * * @since 1.3 */ -public class ReadmeHtmlVelocityDelegate { +public final class ReadmeHtmlVelocityDelegate { /** * A builder class for instantiation of the {@link ReadmeHtmlVelocityDelegate}. */ - public static class ReadmeHtmlVelocityDelegateBuilder { + public static final class ReadmeHtmlVelocityDelegateBuilder { /** The maven artifactId to use in the <code>README.vm</code> template. */ private String artifactId; /** The maven version to use in the <code>README.vm</code> template. */ diff --git a/src/test/java/org/apache/commons/release/plugin/stubs/DistributionDetachmentProjectStub.java b/src/test/java/org/apache/commons/release/plugin/stubs/DistributionDetachmentProjectStub.java index ca666ef..2ecce1e 100644 --- a/src/test/java/org/apache/commons/release/plugin/stubs/DistributionDetachmentProjectStub.java +++ b/src/test/java/org/apache/commons/release/plugin/stubs/DistributionDetachmentProjectStub.java @@ -36,9 +36,9 @@ import org.apache.maven.project.MavenProject; * * @since 1.0 */ -public class DistributionDetachmentProjectStub extends MavenProjectStub { +public final class DistributionDetachmentProjectStub extends MavenProjectStub { - public static class DistributionDetachmentArtifactStub extends ArtifactStub { + public static final class DistributionDetachmentArtifactStub extends ArtifactStub { private final File artifact; diff --git a/src/test/java/org/apache/commons/release/plugin/velocity/ReadmeHtmlVelocityDelegateTest.java b/src/test/java/org/apache/commons/release/plugin/velocity/ReadmeHtmlVelocityDelegateTest.java index a2bd0d1..b2009e2 100644 --- a/src/test/java/org/apache/commons/release/plugin/velocity/ReadmeHtmlVelocityDelegateTest.java +++ b/src/test/java/org/apache/commons/release/plugin/velocity/ReadmeHtmlVelocityDelegateTest.java @@ -27,7 +27,7 @@ import org.junit.Test; /** * Unit tests for {@link ReadmeHtmlVelocityDelegate}. */ -public class ReadmeHtmlVelocityDelegateTest { +public final class ReadmeHtmlVelocityDelegateTest { @Test public void testSuccessfulRun() throws IOException {
