Fix typos in code

Fix minor typos in code :

- test method names,
- method parameter names,
- variable names.
This commit is contained in:
Marc Wrobel 2022-07-18 23:21:50 +02:00 committed by Michael Osipov
parent 5ce5591ae3
commit 8125b3131f
17 changed files with 38 additions and 38 deletions

View File

@ -126,9 +126,9 @@ public class MetadataResolutionRequest
* @deprecated instead use {@link #setRemoteRepositories(List)} * @deprecated instead use {@link #setRemoteRepositories(List)}
*/ */
@Deprecated @Deprecated
public MetadataResolutionRequest setRemoteRepostories( List<ArtifactRepository> remoteRepostories ) public MetadataResolutionRequest setRemoteRepostories( List<ArtifactRepository> remoteRepositories )
{ {
this.remoteRepositories = remoteRepostories; this.remoteRepositories = remoteRepositories;
return this; return this;
} }

View File

@ -240,14 +240,14 @@ public class DefaultUpdateCheckManagerTest
{ {
ArtifactRepository localRepository = localRepository(); ArtifactRepository localRepository = localRepository();
Artifact a = artifactFactory.createArtifactWithClassifier( "groupdId", "a", "0.0.1-SNAPSHOT", "jar", null ); Artifact a = artifactFactory.createArtifactWithClassifier( "groupId", "a", "0.0.1-SNAPSHOT", "jar", null );
File file = new File( localRepository.getBasedir(), File file = new File( localRepository.getBasedir(),
localRepository.pathOf( a ) ); localRepository.pathOf( a ) );
a.setFile( file ); a.setFile( file );
assertEquals( "a-0.0.1-SNAPSHOT.jar.lastUpdated", updateCheckManager.getTouchfile( a ).getName() ); assertEquals( "a-0.0.1-SNAPSHOT.jar.lastUpdated", updateCheckManager.getTouchfile( a ).getName() );
a = artifactFactory.createArtifactWithClassifier( "groupdId", "a", "0.0.1-SNAPSHOT", "jar", "classifier" ); a = artifactFactory.createArtifactWithClassifier( "groupId", "a", "0.0.1-SNAPSHOT", "jar", "classifier" );
file = new File( localRepository.getBasedir(), file = new File( localRepository.getBasedir(),
localRepository.pathOf( a ) ); localRepository.pathOf( a ) );
a.setFile( file ); a.setFile( file );

View File

@ -11,7 +11,7 @@ h3. Plugins
* Maven test harness for plugin execution model * Maven test harness for plugin execution model
* Eclipse IDE tooling for plugin execution model and metadata model * Eclipse IDE tooling for plugin execution model and metadata model
- we also seem to have information like the plugin lifecycle model that's burried inside the maven execution model - we also seem to have information like the plugin lifecycle model that's buried inside the maven execution model
- we also seem to have artifact information tangled inside the plugin model - we also seem to have artifact information tangled inside the plugin model
- we have to deal with scripting implementations (groovy, beanshell, ruby) - we have to deal with scripting implementations (groovy, beanshell, ruby)
- we need to deal with a shared context for plugins, like the guarded mojos - we need to deal with a shared context for plugins, like the guarded mojos

View File

@ -93,11 +93,11 @@ public class DefaultProjectDependenciesResolver
public Set<Artifact> resolve( MavenProject project, Collection<String> scopesToCollect, public Set<Artifact> resolve( MavenProject project, Collection<String> scopesToCollect,
Collection<String> scopesToResolve, MavenSession session, Collection<String> scopesToResolve, MavenSession session,
Set<Artifact> ignoreableArtifacts ) Set<Artifact> ignorableArtifacts )
throws ArtifactResolutionException, ArtifactNotFoundException throws ArtifactResolutionException, ArtifactNotFoundException
{ {
return resolveImpl( Collections.singleton( project ), scopesToCollect, scopesToResolve, session, return resolveImpl( Collections.singleton( project ), scopesToCollect, scopesToResolve, session,
getIgnorableArtifacts( ignoreableArtifacts ) ); getIgnorableArtifacts( ignorableArtifacts ) );
} }

View File

@ -69,17 +69,17 @@ public interface ProjectDependenciesResolver
/** /**
* Resolves the transitive dependencies of the specified project. * Resolves the transitive dependencies of the specified project.
* *
* @param project The project whose dependencies should be resolved, must not be {@code null}. * @param project The project whose dependencies should be resolved, must not be {@code null}.
* @param scopesToCollect The dependency scopes that should be collected, may be {@code null}. * @param scopesToCollect The dependency scopes that should be collected, may be {@code null}.
* @param scopesToResolve The dependency scopes that should be collected and also resolved, may be {@code null}. * @param scopesToResolve The dependency scopes that should be collected and also resolved, may be {@code null}.
* @param session The current build session, must not be {@code null}. * @param session The current build session, must not be {@code null}.
* @param ignoreableArtifacts Artifacts that need not be resolved * @param ignorableArtifacts Artifacts that need not be resolved
* @return The transitive dependencies of the specified project that match the requested scopes, never {@code null}. * @return The transitive dependencies of the specified project that match the requested scopes, never {@code null}.
* @throws ArtifactResolutionException in case of resolution issue * @throws ArtifactResolutionException in case of resolution issue
* @throws ArtifactNotFoundException if an artifact is not found * @throws ArtifactNotFoundException if an artifact is not found
*/ */
Set<Artifact> resolve( MavenProject project, Collection<String> scopesToCollect, Set<Artifact> resolve( MavenProject project, Collection<String> scopesToCollect,
Collection<String> scopesToResolve, MavenSession session, Set<Artifact> ignoreableArtifacts ) Collection<String> scopesToResolve, MavenSession session, Set<Artifact> ignorableArtifacts )
throws ArtifactResolutionException, ArtifactNotFoundException; throws ArtifactResolutionException, ArtifactNotFoundException;
/** /**

View File

@ -29,6 +29,6 @@ import org.apache.maven.plugin.descriptor.PluginDescriptor;
interface MavenPluginValidator interface MavenPluginValidator
{ {
void validate( Artifact pluginArtfiact, PluginDescriptor pluginDescriptor, List<String> errors ); void validate( Artifact pluginArtifact, PluginDescriptor pluginDescriptor, List<String> errors );
} }

View File

@ -592,7 +592,7 @@ public class MavenMetadataSource
{ {
message = "Missing POM for " + artifact.getId(); message = "Missing POM for " + artifact.getId();
} }
else if ( isNonTransferrablePom( e ) ) else if ( isNonTransferablePom( e ) )
{ {
throw new ArtifactMetadataRetrievalException( "Failed to retrieve POM for " throw new ArtifactMetadataRetrievalException( "Failed to retrieve POM for "
+ artifact.getId() + ": " + e.getCause().getMessage(), e.getCause(), + artifact.getId() + ": " + e.getCause().getMessage(), e.getCause(),
@ -736,7 +736,7 @@ public class MavenMetadataSource
&& e.getCause().getCause() instanceof ArtifactNotFoundException; && e.getCause().getCause() instanceof ArtifactNotFoundException;
} }
private boolean isNonTransferrablePom( Exception e ) private boolean isNonTransferablePom( Exception e )
{ {
if ( e.getCause() instanceof ArtifactResolutionException ) if ( e.getCause() instanceof ArtifactResolutionException )
{ {

View File

@ -346,7 +346,7 @@ public class LifecycleExecutorTest
// Prefixes // Prefixes
@Test @Test
public void testFindingPluginPrefixforCleanClean() public void testFindingPluginPrefixForCleanClean()
throws Exception throws Exception
{ {
File pom = getProject( "project-basic" ); File pom = getProject( "project-basic" );

View File

@ -36,7 +36,7 @@ public class MavenExecutionPlanTest
public void testFindLastInPhase() public void testFindLastInPhase()
throws Exception throws Exception
{ {
MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExceutionPlan(); MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExecutionPlan();
ExecutionPlanItem expected = plan.findLastInPhase( "package" ); ExecutionPlanItem expected = plan.findLastInPhase( "package" );
ExecutionPlanItem beerPhase = plan.findLastInPhase( "BEER" ); // Beer comes straight after package in stub ExecutionPlanItem beerPhase = plan.findLastInPhase( "BEER" ); // Beer comes straight after package in stub
@ -48,7 +48,7 @@ public class MavenExecutionPlanTest
public void testThreadSafeMojos() public void testThreadSafeMojos()
throws Exception throws Exception
{ {
MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExceutionPlan(); MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExecutionPlan();
final Set<Plugin> unSafePlugins = plan.getNonThreadSafePlugins(); final Set<Plugin> unSafePlugins = plan.getNonThreadSafePlugins();
// There is only a single threadsafe plugin here... // There is only a single threadsafe plugin here...
assertEquals( plan.size() - 1, unSafePlugins.size() ); assertEquals( plan.size() - 1, unSafePlugins.size() );
@ -60,7 +60,7 @@ public class MavenExecutionPlanTest
public void testFindLastWhenFirst() public void testFindLastWhenFirst()
throws Exception throws Exception
{ {
MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExceutionPlan(); MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExecutionPlan();
ExecutionPlanItem beerPhase = plan.findLastInPhase( ExecutionPlanItem beerPhase = plan.findLastInPhase(
LifecycleExecutionPlanCalculatorStub.VALIDATE.getPhase() ); // Beer comes straight after package in stub LifecycleExecutionPlanCalculatorStub.VALIDATE.getPhase() ); // Beer comes straight after package in stub
@ -71,7 +71,7 @@ public class MavenExecutionPlanTest
public void testFindLastInPhaseMisc() public void testFindLastInPhaseMisc()
throws Exception throws Exception
{ {
MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExceutionPlan(); MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExecutionPlan();
assertNull( plan.findLastInPhase( "pacXkage" ) ); assertNull( plan.findLastInPhase( "pacXkage" ) );
// Beer comes straight after package in stub, much like real life. // Beer comes straight after package in stub, much like real life.

View File

@ -34,7 +34,7 @@ public class PhaseRecorderTest
@Test @Test
public void testObserveExecution() throws Exception { public void testObserveExecution() throws Exception {
PhaseRecorder phaseRecorder = new PhaseRecorder( ProjectDependencyGraphStub.A); PhaseRecorder phaseRecorder = new PhaseRecorder( ProjectDependencyGraphStub.A);
MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExceutionPlan(); MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExecutionPlan();
final List<MojoExecution> executions = plan.getMojoExecutions(); final List<MojoExecution> executions = plan.getMojoExecutions();
final MojoExecution mojoExecution1 = executions.get( 0 ); final MojoExecution mojoExecution1 = executions.get( 0 );

View File

@ -52,7 +52,7 @@ public class BuilderCommonTest
final MavenExecutionPlan plan = final MavenExecutionPlan plan =
builderCommon.resolveBuildPlan( session1, ProjectDependencyGraphStub.A, taskSegment1, builderCommon.resolveBuildPlan( session1, ProjectDependencyGraphStub.A, taskSegment1,
new HashSet<>() ); new HashSet<>() );
assertEquals( LifecycleExecutionPlanCalculatorStub.getProjectAExceutionPlan().size(), plan.size() ); assertEquals( LifecycleExecutionPlanCalculatorStub.getProjectAExecutionPlan().size(), plan.size() );
} }
@Test @Test

View File

@ -137,7 +137,7 @@ public class LifecycleExecutionPlanCalculatorStub
{ {
if ( project.equals( ProjectDependencyGraphStub.A ) ) if ( project.equals( ProjectDependencyGraphStub.A ) )
{ {
return getProjectAExceutionPlan(); return getProjectAExecutionPlan();
} }
if ( project.equals( ProjectDependencyGraphStub.B ) ) if ( project.equals( ProjectDependencyGraphStub.B ) )
{ {
@ -165,7 +165,7 @@ public class LifecycleExecutionPlanCalculatorStub
{ {
} }
public static MavenExecutionPlan getProjectAExceutionPlan() public static MavenExecutionPlan getProjectAExecutionPlan()
throws PluginNotFoundException, PluginResolutionException, LifecyclePhaseNotFoundException, throws PluginNotFoundException, PluginResolutionException, LifecyclePhaseNotFoundException,
PluginDescriptorParsingException, MojoNotFoundException, InvalidPluginDescriptorException, PluginDescriptorParsingException, MojoNotFoundException, InvalidPluginDescriptorException,
NoPluginFoundForPrefixException, LifecycleNotFoundException, PluginVersionResolutionException NoPluginFoundForPrefixException, LifecycleNotFoundException, PluginVersionResolutionException

View File

@ -62,7 +62,7 @@ public class ProjectDependenciesResolverStub
public Set<Artifact> resolve( MavenProject project, Collection<String> scopesToCollect, public Set<Artifact> resolve( MavenProject project, Collection<String> scopesToCollect,
Collection<String> scopesToResolve, MavenSession session, Collection<String> scopesToResolve, MavenSession session,
Set<Artifact> ignoreableArtifacts ) Set<Artifact> ignorableArtifacts )
throws ArtifactResolutionException, ArtifactNotFoundException throws ArtifactResolutionException, ArtifactNotFoundException
{ {
return new HashSet<>(); return new HashSet<>();

View File

@ -41,7 +41,7 @@ public class ProjectDependencyGraphStubTest
} }
@Test @Test
public void testBDepenencies() public void testBDependencies()
{ {
final List<MavenProject> bProjects = stub.getUpstreamProjects( ProjectDependencyGraphStub.B, false ); final List<MavenProject> bProjects = stub.getUpstreamProjects( ProjectDependencyGraphStub.B, false );
assertEquals( 1, bProjects.size() ); assertEquals( 1, bProjects.size() );
@ -49,7 +49,7 @@ public class ProjectDependencyGraphStubTest
} }
@Test @Test
public void testCDepenencies() public void testCDependencies()
{ {
final List<MavenProject> cProjects = stub.getUpstreamProjects( ProjectDependencyGraphStub.C, false ); final List<MavenProject> cProjects = stub.getUpstreamProjects( ProjectDependencyGraphStub.C, false );
assertEquals( 1, cProjects.size() ); assertEquals( 1, cProjects.size() );
@ -57,7 +57,7 @@ public class ProjectDependencyGraphStubTest
} }
@Test @Test
public void testXDepenencies() public void testXDependencies()
{ {
final List<MavenProject> cProjects = stub.getUpstreamProjects( ProjectDependencyGraphStub.X, false ); final List<MavenProject> cProjects = stub.getUpstreamProjects( ProjectDependencyGraphStub.X, false );
assertEquals( 2, cProjects.size() ); assertEquals( 2, cProjects.size() );

View File

@ -404,10 +404,10 @@ public class MavenCli
} }
mavenConfig = cliManager.parse( args.toArray( new String[0] ) ); mavenConfig = cliManager.parse( args.toArray( new String[0] ) );
List<?> unrecongized = mavenConfig.getArgList(); List<?> unrecognized = mavenConfig.getArgList();
if ( !unrecongized.isEmpty() ) if ( !unrecognized.isEmpty() )
{ {
throw new ParseException( "Unrecognized maven.config entries: " + unrecongized ); throw new ParseException( "Unrecognized maven.config entries: " + unrecognized );
} }
} }
} }

View File

@ -424,9 +424,9 @@ public class MavenCliTest
customizedMavenCli.container(cliRequest); customizedMavenCli.container(cliRequest);
customizedMavenCli.toolchains(cliRequest); customizedMavenCli.toolchains(cliRequest);
InOrder orderdEventSpyDispatcherMock = inOrder(eventSpyDispatcherMock); InOrder orderedEventSpyDispatcherMock = inOrder(eventSpyDispatcherMock);
orderdEventSpyDispatcherMock.verify(eventSpyDispatcherMock, times(1)).onEvent(any(ToolchainsBuildingRequest.class)); orderedEventSpyDispatcherMock.verify(eventSpyDispatcherMock, times(1)).onEvent(any(ToolchainsBuildingRequest.class));
orderdEventSpyDispatcherMock.verify(eventSpyDispatcherMock, times(1)).onEvent(any(ToolchainsBuildingResult.class)); orderedEventSpyDispatcherMock.verify(eventSpyDispatcherMock, times(1)).onEvent(any(ToolchainsBuildingResult.class));
} }
@Test @Test

View File

@ -63,10 +63,10 @@ public class FileModelSourceTest
String absolutePath = upperCaseFile.getAbsolutePath(); String absolutePath = upperCaseFile.getAbsolutePath();
File lowerCaseFile = new File( absolutePath.toLowerCase() ); File lowerCaseFile = new File( absolutePath.toLowerCase() );
FileModelSource upperCaseFileSouce = new FileModelSource( upperCaseFile ); FileModelSource upperCaseFileSource = new FileModelSource( upperCaseFile );
FileModelSource lowerCaseFileSouce = new FileModelSource( lowerCaseFile ); FileModelSource lowerCaseFileSource = new FileModelSource( lowerCaseFile );
assertTrue( upperCaseFileSouce.equals( lowerCaseFileSouce ) ); assertTrue( upperCaseFileSource.equals( lowerCaseFileSource ) );
} }
private File createTempFile( String name ) throws IOException private File createTempFile( String name ) throws IOException