Skip to content

Commit

Permalink
Fix typos in code
Browse files Browse the repository at this point in the history
Fix minor typos in code :

- test method names,
- method parameter names,
- variable names.
  • Loading branch information
marcwrobel authored and michael-o committed Jul 18, 2022
1 parent 5ce5591 commit 8125b31
Show file tree
Hide file tree
Showing 17 changed files with 38 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ public List<ArtifactRepository> getRemoteRepositories()
* @deprecated instead use {@link #setRemoteRepositories(List)}
*/
@Deprecated
public MetadataResolutionRequest setRemoteRepostories( List<ArtifactRepository> remoteRepostories )
public MetadataResolutionRequest setRemoteRepostories( List<ArtifactRepository> remoteRepositories )
{
this.remoteRepositories = remoteRepostories;
this.remoteRepositories = remoteRepositories;

return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,14 @@ public void testArtifactTouchFileName() throws Exception
{
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(),
localRepository.pathOf( a ) );
a.setFile( file );

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(),
localRepository.pathOf( a ) );
a.setFile( file );
Expand Down
2 changes: 1 addition & 1 deletion maven-core/plugin-manager.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ h3. Plugins
* Maven test harness for plugin execution 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 have to deal with scripting implementations (groovy, beanshell, ruby)
- we need to deal with a shared context for plugins, like the guarded mojos
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ public Set<Artifact> resolve( Collection<? extends MavenProject> projects, Colle

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


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ Set<Artifact> resolve( MavenProject project, Collection<String> scopesToCollect,
/**
* Resolves the transitive dependencies of the specified project.
*
* @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 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 ignoreableArtifacts Artifacts that need not be resolved
* @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 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 ignorableArtifacts Artifacts that need not be resolved
* @return The transitive dependencies of the specified project that match the requested scopes, never {@code null}.
* @throws ArtifactResolutionException in case of resolution issue
* @throws ArtifactNotFoundException if an artifact is not found
*/
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;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
interface MavenPluginValidator
{

void validate( Artifact pluginArtfiact, PluginDescriptor pluginDescriptor, List<String> errors );
void validate( Artifact pluginArtifact, PluginDescriptor pluginDescriptor, List<String> errors );

}
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ private ProjectRelocation retrieveRelocatedProject( Artifact artifact, MetadataR
{
message = "Missing POM for " + artifact.getId();
}
else if ( isNonTransferrablePom( e ) )
else if ( isNonTransferablePom( e ) )
{
throw new ArtifactMetadataRetrievalException( "Failed to retrieve POM for "
+ artifact.getId() + ": " + e.getCause().getMessage(), e.getCause(),
Expand Down Expand Up @@ -736,7 +736,7 @@ private boolean isMissingPom( Exception e )
&& e.getCause().getCause() instanceof ArtifactNotFoundException;
}

private boolean isNonTransferrablePom( Exception e )
private boolean isNonTransferablePom( Exception e )
{
if ( e.getCause() instanceof ArtifactResolutionException )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ public void testPluginPrefixRetrieval()
// Prefixes

@Test
public void testFindingPluginPrefixforCleanClean()
public void testFindingPluginPrefixForCleanClean()
throws Exception
{
File pom = getProject( "project-basic" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class MavenExecutionPlanTest
public void testFindLastInPhase()
throws Exception
{
MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExceutionPlan();
MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExecutionPlan();

ExecutionPlanItem expected = plan.findLastInPhase( "package" );
ExecutionPlanItem beerPhase = plan.findLastInPhase( "BEER" ); // Beer comes straight after package in stub
Expand All @@ -48,7 +48,7 @@ public void testFindLastInPhase()
public void testThreadSafeMojos()
throws Exception
{
MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExceutionPlan();
MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExecutionPlan();
final Set<Plugin> unSafePlugins = plan.getNonThreadSafePlugins();
// There is only a single threadsafe plugin here...
assertEquals( plan.size() - 1, unSafePlugins.size() );
Expand All @@ -60,7 +60,7 @@ public void testThreadSafeMojos()
public void testFindLastWhenFirst()
throws Exception
{
MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExceutionPlan();
MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExecutionPlan();

ExecutionPlanItem beerPhase = plan.findLastInPhase(
LifecycleExecutionPlanCalculatorStub.VALIDATE.getPhase() ); // Beer comes straight after package in stub
Expand All @@ -71,7 +71,7 @@ public void testFindLastWhenFirst()
public void testFindLastInPhaseMisc()
throws Exception
{
MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExceutionPlan();
MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExecutionPlan();

assertNull( plan.findLastInPhase( "pacXkage" ) );
// Beer comes straight after package in stub, much like real life.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class PhaseRecorderTest
@Test
public void testObserveExecution() throws Exception {
PhaseRecorder phaseRecorder = new PhaseRecorder( ProjectDependencyGraphStub.A);
MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExceutionPlan();
MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExecutionPlan();
final List<MojoExecution> executions = plan.getMojoExecutions();

final MojoExecution mojoExecution1 = executions.get( 0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void testResolveBuildPlan()
final MavenExecutionPlan plan =
builderCommon.resolveBuildPlan( session1, ProjectDependencyGraphStub.A, taskSegment1,
new HashSet<>() );
assertEquals( LifecycleExecutionPlanCalculatorStub.getProjectAExceutionPlan().size(), plan.size() );
assertEquals( LifecycleExecutionPlanCalculatorStub.getProjectAExecutionPlan().size(), plan.size() );
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public MavenExecutionPlan calculateExecutionPlan( MavenSession session, MavenPro
{
if ( project.equals( ProjectDependencyGraphStub.A ) )
{
return getProjectAExceutionPlan();
return getProjectAExecutionPlan();
}
if ( project.equals( ProjectDependencyGraphStub.B ) )
{
Expand Down Expand Up @@ -165,7 +165,7 @@ public void setupMojoExecution( MavenSession session, MavenProject project, Mojo
{
}

public static MavenExecutionPlan getProjectAExceutionPlan()
public static MavenExecutionPlan getProjectAExecutionPlan()
throws PluginNotFoundException, PluginResolutionException, LifecyclePhaseNotFoundException,
PluginDescriptorParsingException, MojoNotFoundException, InvalidPluginDescriptorException,
NoPluginFoundForPrefixException, LifecycleNotFoundException, PluginVersionResolutionException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public Set<Artifact> resolve( Collection<? extends MavenProject> projects, Colle

public Set<Artifact> resolve( MavenProject project, Collection<String> scopesToCollect,
Collection<String> scopesToResolve, MavenSession session,
Set<Artifact> ignoreableArtifacts )
Set<Artifact> ignorableArtifacts )
throws ArtifactResolutionException, ArtifactNotFoundException
{
return new HashSet<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,23 @@ public void testADependencies()
}

@Test
public void testBDepenencies()
public void testBDependencies()
{
final List<MavenProject> bProjects = stub.getUpstreamProjects( ProjectDependencyGraphStub.B, false );
assertEquals( 1, bProjects.size() );
assertTrue( bProjects.contains( ProjectDependencyGraphStub.A ) );
}

@Test
public void testCDepenencies()
public void testCDependencies()
{
final List<MavenProject> cProjects = stub.getUpstreamProjects( ProjectDependencyGraphStub.C, false );
assertEquals( 1, cProjects.size() );
assertTrue( cProjects.contains( ProjectDependencyGraphStub.A ) );
}

@Test
public void testXDepenencies()
public void testXDependencies()
{
final List<MavenProject> cProjects = stub.getUpstreamProjects( ProjectDependencyGraphStub.X, false );
assertEquals( 2, cProjects.size() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,10 @@ void cli( CliRequest cliRequest )
}

mavenConfig = cliManager.parse( args.toArray( new String[0] ) );
List<?> unrecongized = mavenConfig.getArgList();
if ( !unrecongized.isEmpty() )
List<?> unrecognized = mavenConfig.getArgList();
if ( !unrecognized.isEmpty() )
{
throw new ParseException( "Unrecognized maven.config entries: " + unrecongized );
throw new ParseException( "Unrecognized maven.config entries: " + unrecognized );
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,9 @@ protected void customizeContainer(PlexusContainer container) {
customizedMavenCli.container(cliRequest);
customizedMavenCli.toolchains(cliRequest);

InOrder orderdEventSpyDispatcherMock = inOrder(eventSpyDispatcherMock);
orderdEventSpyDispatcherMock.verify(eventSpyDispatcherMock, times(1)).onEvent(any(ToolchainsBuildingRequest.class));
orderdEventSpyDispatcherMock.verify(eventSpyDispatcherMock, times(1)).onEvent(any(ToolchainsBuildingResult.class));
InOrder orderedEventSpyDispatcherMock = inOrder(eventSpyDispatcherMock);
orderedEventSpyDispatcherMock.verify(eventSpyDispatcherMock, times(1)).onEvent(any(ToolchainsBuildingRequest.class));
orderedEventSpyDispatcherMock.verify(eventSpyDispatcherMock, times(1)).onEvent(any(ToolchainsBuildingResult.class));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ public void testWindowsPaths()
String absolutePath = upperCaseFile.getAbsolutePath();
File lowerCaseFile = new File( absolutePath.toLowerCase() );

FileModelSource upperCaseFileSouce = new FileModelSource( upperCaseFile );
FileModelSource lowerCaseFileSouce = new FileModelSource( lowerCaseFile );
FileModelSource upperCaseFileSource = new FileModelSource( upperCaseFile );
FileModelSource lowerCaseFileSource = new FileModelSource( lowerCaseFile );

assertTrue( upperCaseFileSouce.equals( lowerCaseFileSouce ) );
assertTrue( upperCaseFileSource.equals( lowerCaseFileSource ) );
}

private File createTempFile( String name ) throws IOException
Expand Down

0 comments on commit 8125b31

Please sign in to comment.