From ab95197436417c79d8027243f5d621b663173c22 Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Fri, 8 Jan 2021 04:10:00 +0100 Subject: [PATCH] Fix Checkstyle reported issues with maven-shared-resources 3 --- .../org/apache/maven/execution/BuildResumptionAnalyzer.java | 2 +- .../maven/execution/BuildResumptionDataRepository.java | 6 +++--- .../maven/project/collector/ProjectCollectionStrategy.java | 2 +- .../model/building/DefaultBuildPomXMLFilterFactory.java | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/maven-core/src/main/java/org/apache/maven/execution/BuildResumptionAnalyzer.java b/maven-core/src/main/java/org/apache/maven/execution/BuildResumptionAnalyzer.java index 1778946b00..fa3db8a343 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/BuildResumptionAnalyzer.java +++ b/maven-core/src/main/java/org/apache/maven/execution/BuildResumptionAnalyzer.java @@ -32,5 +32,5 @@ public interface BuildResumptionAnalyzer * @param result Outcome of the current Maven build. * @return A {@link BuildResumptionData} instance or {@link Optional#empty()} if resuming the build is not possible. */ - Optional determineBuildResumptionData( final MavenExecutionResult result ); + Optional determineBuildResumptionData( MavenExecutionResult result ); } diff --git a/maven-core/src/main/java/org/apache/maven/execution/BuildResumptionDataRepository.java b/maven-core/src/main/java/org/apache/maven/execution/BuildResumptionDataRepository.java index 3d0be6f607..36453f662a 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/BuildResumptionDataRepository.java +++ b/maven-core/src/main/java/org/apache/maven/execution/BuildResumptionDataRepository.java @@ -37,7 +37,7 @@ public interface BuildResumptionDataRepository * @param buildResumptionData Information needed to resume the build. * @throws BuildResumptionPersistenceException When an error occurs while persisting data. */ - void persistResumptionData( final MavenProject rootProject, final BuildResumptionData buildResumptionData ) + void persistResumptionData( MavenProject rootProject, BuildResumptionData buildResumptionData ) throws BuildResumptionPersistenceException; /** @@ -45,12 +45,12 @@ public interface BuildResumptionDataRepository * @param request The execution request that will be enriched. * @param rootProject The root project that is being built. */ - void applyResumptionData( final MavenExecutionRequest request, final MavenProject rootProject ); + void applyResumptionData( MavenExecutionRequest request, MavenProject rootProject ); /** * Removes previously stored resumption data. * @param rootProject The root project that is being built. */ - void removeResumptionData( final MavenProject rootProject ); + void removeResumptionData( MavenProject rootProject ); } diff --git a/maven-core/src/main/java/org/apache/maven/project/collector/ProjectCollectionStrategy.java b/maven-core/src/main/java/org/apache/maven/project/collector/ProjectCollectionStrategy.java index e1931fe43a..53521f09d9 100644 --- a/maven-core/src/main/java/org/apache/maven/project/collector/ProjectCollectionStrategy.java +++ b/maven-core/src/main/java/org/apache/maven/project/collector/ProjectCollectionStrategy.java @@ -36,6 +36,6 @@ public interface ProjectCollectionStrategy * @return * @throws ProjectBuildingException */ - List collectProjects( final MavenExecutionRequest request ) + List collectProjects( MavenExecutionRequest request ) throws ProjectBuildingException; } diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultBuildPomXMLFilterFactory.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultBuildPomXMLFilterFactory.java index 2cd3c6b252..906584d5a7 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultBuildPomXMLFilterFactory.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultBuildPomXMLFilterFactory.java @@ -64,7 +64,7 @@ public class DefaultBuildPomXMLFilterFactory extends BuildToRawPomXMLFilterFacto @Override protected BiFunction getDependencyKeyToVersionMapper() { - return (g, a) -> Optional.ofNullable( context.getRawModel( g, a ) ) + return ( g, a ) -> Optional.ofNullable( context.getRawModel( g, a ) ) .map( m -> toVersion( m ) ) .orElse( null ); }