Skip to content

Commit a5df9b6

Browse files
authored
Grammar and typo fixes in javadoc and other comments (#2222)
* A few grammar fixes in javadoc
1 parent 1ac07e0 commit a5df9b6

File tree

48 files changed

+75
-123
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+75
-123
lines changed

api/maven-api-core/src/main/java/org/apache/maven/api/JavaPathType.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public String id() {
203203
/**
204204
* Returns the identification of this path in the {@code javax.tool} API.
205205
* The value may be an instance of {@link StandardLocation} or {@link DocumentationTool.Location},
206-
* depending which tool will use this location.
206+
* depending on which tool will use this location.
207207
*
208208
* @return the {@code javax.tool} enumeration value corresponding to this {@code JavaPathType}
209209
*/

api/maven-api-core/src/main/java/org/apache/maven/api/Lifecycle.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public interface Lifecycle extends ExtensibleEnum {
7373

7474
/**
7575
* Collection of main phases for this lifecycle used with the Maven 3 builders.
76-
* Those builders does not operate on a graph, but on the list and expect a slightly
76+
* Those builders do not operate on a graph, but on the list and expect a slightly
7777
* different ordering (mainly unit test being executed before packaging).
7878
*
7979
* @return the collection of phases in Maven 3 compatible ordering

api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactInstaller.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ public interface ArtifactInstaller extends Service {
4545
/**
4646
* @param session the repository session
4747
* @param artifact the {@link ProducedArtifact} to install
48-
* @throws ArtifactInstallerException In case of an error which can be the a given artifact cannot be found or the
49-
* installation has failed.
50-
* @throws IllegalArgumentException in case of parameter {@code session} is {@code null} or
51-
* {@code artifact} is {@code null}.
48+
* @throws ArtifactInstallerException in case of an error which can be a given artifact cannot be found or the
49+
* installation has failed
50+
* @throws IllegalArgumentException if a parameter {@code session} is {@code null} or
51+
* {@code artifact} is {@code null}
5252
*/
5353
default void install(Session session, ProducedArtifact artifact) {
5454
install(session, Collections.singletonList(artifact));
@@ -57,9 +57,9 @@ default void install(Session session, ProducedArtifact artifact) {
5757
/**
5858
* @param session the repository session
5959
* @param artifacts Collection of {@link ProducedArtifact MavenArtifacts}
60-
* @throws ArtifactInstallerException In case of an error which can be the a given artifact cannot be found or the
61-
* installation has failed.
62-
* @throws IllegalArgumentException in case of parameter {@code request} is {@code null} or parameter
60+
* @throws ArtifactInstallerException if the given artifact cannot be found or the
61+
* installation has failed
62+
* @throws IllegalArgumentException if {@code request} is {@code null} or parameter
6363
* {@code localRepository} is {@code null} or {@code localRepository} is not a directory
6464
* or parameter {@code mavenArtifacts} is {@code null} or
6565
* {@code mavenArtifacts.isEmpty()} is {@code true}.

api/maven-api-core/src/main/java/org/apache/maven/api/services/SettingsBuilder.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import org.apache.maven.api.settings.Settings;
2828

2929
/**
30-
* Builds the effective settings from a user settings file and/or a installation settings file.
30+
* Builds the effective settings from a user settings file and/or an installation settings file.
3131
*
3232
* @since 4.0.0
3333
*/

api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/XmlFactory.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ default T fromXmlString(@Nonnull String xml) throws XmlReaderException {
103103
}
104104

105105
/**
106-
* Simply converts the given content to an xml string.
106+
* Converts the given content to an XML string.
107107
*
108108
* @param content the object to convert
109109
* @return the xml string representation

api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/XmlReaderException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import org.apache.maven.api.services.MavenException;
2323

2424
/**
25-
* An exception thrown during the reading of an xml file.
25+
* An exception thrown while reading an XML file.
2626
*
2727
* @since 4.0.0
2828
*/

api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/XmlWriterException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import org.apache.maven.api.services.MavenException;
2323

2424
/**
25-
* An exception thrown during the writing of an xml file.
25+
* An exception thrown while writing an XML file.
2626
*
2727
* @since 4.0.0
2828
*/

compat/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactCollector.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
2828

2929
/**
30-
* Artifact collector - takes a set of original artifacts and resolves all of the best versions to use
30+
* Artifact collector - takes a set of original artifacts and resolves the best versions to use
3131
* along with their metadata. No artifacts are downloaded.
3232
*/
3333
@Deprecated

compat/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactCollector.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import javax.inject.Singleton;
2323

2424
/**
25-
* Artifact collector - takes a set of original artifacts and resolves all of the best versions to use
25+
* Artifact collector - takes a set of original artifacts and resolves the best versions to use
2626
* along with their metadata. No artifacts are downloaded.
2727
*/
2828
@Deprecated

compat/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ private void handleChecksumFailure(String checksumPolicy, String message, Throwa
602602
// warn if it is set to anything other than ignore
603603
logger.warn("*** CHECKSUM FAILED - " + message + " - IGNORING");
604604
}
605-
// otherwise it is ignore
605+
// otherwise it is ignored
606606
}
607607

608608
private void verifyChecksum(

compat/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/LegacyArtifactCollector.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@
3232
import org.apache.maven.repository.legacy.resolver.conflict.ConflictResolver;
3333

3434
/**
35-
* Artifact collector - takes a set of original artifacts and resolves all of the best versions to use
35+
* Artifact collector - takes a set of original artifacts and resolves the best versions to use
3636
* along with their metadata. No artifacts are downloaded.
37-
*
3837
*/
3938
@Deprecated
4039
@SuppressWarnings("checkstyle:parameternumber")

compat/maven-compat/src/main/java/org/apache/maven/repository/metadata/DefaultClasspathTransformation.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ protected ClasspathGraphVisitor(MetadataGraph cleanGraph, ClasspathContainer cpc
9393
}
9494

9595
// -----------------------------------------------------------------------
96-
protected void visit(MetadataGraphVertex node) // , String version, String artifactUri )
97-
{
96+
protected void visit(MetadataGraphVertex node) {
9897
ArtifactMetadata md = node.getMd();
9998
if (visited.contains(node)) {
10099
return;

compat/maven-compat/src/main/java/org/apache/maven/toolchain/java/JavaToolchainFactory.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public ToolchainPrivate createToolchain(ToolchainModel model) throws Misconfigur
9797

9898
public ToolchainPrivate createDefaultToolchain() {
9999
// not sure it's necessary to provide a default toolchain here.
100-
// only version can be eventually supplied, and
100+
// only version can be eventually supplied.
101101
return null;
102102
}
103103

compat/maven-embedder/src/main/java/org/fusesource/jansi/Ansi.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public int bgBright() {
8484
}
8585

8686
/**
87-
* Display attributes, also know as
87+
* Display attributes, also known as
8888
* <a href="https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters">SGR
8989
* (Select Graphic Rendition) parameters</a>.
9090
*/

compat/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProcessor.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@
4141
* made this component available under all its interfaces then it could end up being injected
4242
* into itself leading to a stack overflow.
4343
*
44-
* A side-effect of using @Typed is that it translates to explicit bindings in the container.
44+
* A side effect of using @Typed is that it translates to explicit bindings in the container.
4545
* So instead of binding the component under a 'wildcard' key it is now bound with an explicit
46-
* key. Since this is a default component this will be a plain binding of ModelProcessor to
47-
* this implementation type, ie. no hint/name.
46+
* key. Since this is a default component, this will be a plain binding of ModelProcessor to
47+
* this implementation type; that is no hint/name.
4848
*
49-
* This leads to a second side-effect in that any @Inject request for just ModelProcessor in
49+
* This leads to a second side effect in that any @Inject request for just ModelProcessor in
5050
* the same injector is immediately matched to this explicit binding, which means extensions
5151
* cannot override this binding. This is because the lookup is always short-circuited in this
5252
* specific situation (plain @Inject request, and plain explicit binding for the same type.)

compat/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingRequest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public interface ModelBuildingRequest {
104104
/**
105105
* Sets the POM file of the project to build. Note that providing the path to a POM file via this method will make
106106
* the model builder operate in project mode. This mode is meant for effective models that are employed during the
107-
* build process of a local project. Hence the effective model will support the notion of a project directory. To
107+
* build process of a local project. Hence, the effective model will support the notion of a project directory. To
108108
* build the model for a POM from the repository, use {@link #setModelSource(ModelSource)} in combination with a
109109
* {@link FileModelSource} instead.
110110
*
@@ -154,7 +154,7 @@ public interface ModelBuildingRequest {
154154
* builder will only produce an interim result which may be used to analyze inter-model dependencies before the
155155
* final invocation of the model builder is performed.
156156
*
157-
* @return {@code true} if two-phase building is enabled, {@code false} if the model should be build in a single
157+
* @return {@code true} if two-phase building is enabled, {@code false} if the model should be built in a single
158158
* step.
159159
*/
160160
boolean isTwoPhaseBuilding();
@@ -164,7 +164,7 @@ public interface ModelBuildingRequest {
164164
* interim result which may be used to analyze inter-model dependencies before the final invocation of the model
165165
* builder is performed.
166166
*
167-
* @param twoPhaseBuilding {@code true} to enable two-phase building, {@code false} if the model should be build in
167+
* @param twoPhaseBuilding {@code true} to enable two-phase building, {@code false} if the model should be built in
168168
* a single step.
169169
* @return This request, never {@code null}.
170170
*/

compat/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelCache.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* Caches auxiliary data used during model building like already processed raw/effective models. The data in the cache
2323
* is meant for exclusive consumption by the model builder and is opaque to the cache implementation. The cache key is
2424
* formed by a combination of group id, artifact id, version and tag. The first three components generally refer to the
25-
* identify of a model. The tag allows for further classification of the associated data on the sole discretion of the
25+
* identity of a model. The tag allows for further classification of the associated data on the sole discretion of the
2626
* model builder.
2727
*
2828
* @deprecated use {@code org.apache.maven.api.services.ModelBuilder} instead

compat/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public Object getValue(String expression) {
158158

159159
valueSources.add(new MapBasedValueSource(config.getUserProperties()));
160160

161-
// Overwrite existing values in model properties. Otherwise it's not possible
161+
// Overwrite existing values in model properties. Otherwise, it's not possible
162162
// to define them via command line e.g.: mvn -Drevision=6.5.7 ...
163163
versionProcessor.overwriteModelProperties(modelProperties, config);
164164
valueSources.add(new MapBasedValueSource(modelProperties));

compat/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/reflection/ClassMap.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ private void populateMethodCache() {
127127
Method publicMethod = getPublicMethod(method);
128128

129129
// it is entirely possible that there is no public method for
130-
// the methods of this class (i.e. in the facade, a method
130+
// the methods of this class; i.e. in the facade, a method
131131
// that isn't on any of the interfaces or superclass
132-
// in which case, ignore it. Otherwise, map and cache
132+
// in which case, ignore it. Otherwise, map and cache.
133133
if (publicMethod != null) {
134134
methodMap.add(publicMethod);
135135
methodCache.put(makeMethodKey(publicMethod), publicMethod);

compat/maven-model-builder/src/main/java/org/apache/maven/model/io/ModelParseException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import java.io.IOException;
2222

2323
/**
24-
* Signals a failure to parse the POM due to invalid syntax (e.g. non well formed XML or unknown elements).
24+
* Signals a failure to parse the POM due to invalid syntax (e.g. non well-formed XML or unknown elements).
2525
*
2626
* @deprecated use {@code org.apache.maven.api.services.xml.ModelXmlFactory} instead
2727
*/

compat/maven-model-builder/src/main/java/org/apache/maven/model/locator/ModelLocator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public interface ModelLocator {
3030

3131
/**
3232
* Locates the POM file within the specified project directory. In case the given project directory does not exist
33-
* or does not contain a POM file, the return value indicates the expected path to the POM file. Sub directories of
33+
* or does not contain a POM file, the return value indicates the expected path to the POM file. Subdirectories of
3434
* the project directory will not be considered when locating the POM file. The return value will be an absolute
3535
* path if the project directory is given as an absolute path.
3636
*

compat/maven-model-builder/src/main/java/org/apache/maven/model/resolution/ModelResolver.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ public interface ModelResolver {
9797
/**
9898
* Adds a repository to use for subsequent resolution requests. The order in which repositories are added matters,
9999
* repositories that were added first should also be searched first. When multiple repositories with the same
100-
* identifier are added, then the value of the replace argument is determines the behaviour.
100+
* identifier are added, then the value of the replace argument determines the behaviour.
101101
*
102-
* If replace is false than any existing repository with the same Id will remain in use. If replace
103-
* is true the new repository replaces the original.
102+
* If replace is false, then any existing repository with the same ID will remain in use. If replace
103+
* is true, the new repository replaces the original.
104104
*
105-
* @param repository The repository to add to the internal search chain, must not be {@code null}.
106-
* @throws InvalidRepositoryException If the repository could not be added (e.g. due to invalid URL or layout).
105+
* @param repository the repository to add to the internal search chain, must not be {@code null}
106+
* @throws InvalidRepositoryException if the repository could not be added (e.g. due to invalid URL or layout)
107107
*/
108108
void addRepository(Repository repository, boolean replace) throws InvalidRepositoryException;
109109

compat/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public void setLog(Log log) {
154154

155155
/**
156156
* <p>
157-
* Returns the logger that has been injected into this mojo. If no logger has been setup yet, a
157+
* Returns the logger that has been injected into this mojo. If no logger has been set up yet, a
158158
* <code>SystemStreamLog</code> logger will be created and returned.
159159
* </p>
160160
* <strong>Note:</strong>

compat/maven-settings-builder/src/main/java/org/apache/maven/settings/building/SettingsBuildingException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import java.util.List;
2525

2626
/**
27-
* Signals one ore more errors during settings building. The settings builder tries to collect as many problems as
27+
* Signals one or more errors during settings building. The settings builder tries to collect as many problems as
2828
* possible before eventually failing to provide callers with rich error information. Use {@link #getProblems()} to
2929
* query the details of the failure.
3030
*

compat/maven-settings-builder/src/main/java/org/apache/maven/settings/io/SettingsParseException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import java.io.IOException;
2222

2323
/**
24-
* Signals a failure to parse the settings due to invalid syntax (e.g. non well formed XML or unknown elements).
24+
* Signals a failure to parse the settings due to invalid syntax (e.g. non well-formed XML or unknown elements).
2525
*
2626
* @deprecated since 4.0.0, use {@link org.apache.maven.api.services.xml.SettingsXmlFactory} instead
2727
*/

compat/maven-settings/src/main/java/org/apache/maven/settings/io/xpp3/SettingsXpp3Reader.java

-44
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,6 @@ public void setAddDefaultEntities(boolean addDefaultEntities) {
6464
delegate.setAddDefaultEntities(addDefaultEntities);
6565
}
6666

67-
/**
68-
* @param reader a reader object.
69-
* @param strict a strict object.
70-
* @throws IOException IOException if any.
71-
* @throws XmlPullParserException XmlPullParserException if
72-
* any.
73-
* @return Settings
74-
*/
7567
public Settings read(Reader reader, boolean strict) throws IOException, XmlPullParserException {
7668
try {
7769
return new Settings(delegate.read(reader, strict, null));
@@ -80,13 +72,6 @@ public Settings read(Reader reader, boolean strict) throws IOException, XmlPullP
8072
}
8173
}
8274

83-
/**
84-
* @param reader a reader object.
85-
* @throws IOException IOException if any.
86-
* @throws XmlPullParserException XmlPullParserException if
87-
* any.
88-
* @return Model
89-
*/
9075
public Settings read(Reader reader) throws IOException, XmlPullParserException {
9176
try {
9277
return new Settings(delegate.read(reader));
@@ -95,16 +80,6 @@ public Settings read(Reader reader) throws IOException, XmlPullParserException {
9580
}
9681
}
9782

98-
/**
99-
* Method read.
100-
*
101-
* @param in a in object.
102-
* @param strict a strict object.
103-
* @throws IOException IOException if any.
104-
* @throws XmlPullParserException XmlPullParserException if
105-
* any.
106-
* @return Settings
107-
*/
10883
public Settings read(InputStream in, boolean strict) throws IOException, XmlPullParserException {
10984
try {
11085
return new Settings(delegate.read(in, strict, null));
@@ -113,15 +88,6 @@ public Settings read(InputStream in, boolean strict) throws IOException, XmlPull
11388
}
11489
}
11590

116-
/**
117-
* Method read.
118-
*
119-
* @param in a in object.
120-
* @throws IOException IOException if any.
121-
* @throws XmlPullParserException XmlPullParserException if
122-
* any.
123-
* @return Settings
124-
*/
12591
public Settings read(InputStream in) throws IOException, XmlPullParserException {
12692
try {
12793
return new Settings(delegate.read(in));
@@ -130,16 +96,6 @@ public Settings read(InputStream in) throws IOException, XmlPullParserException
13096
}
13197
}
13298

133-
/**
134-
* Method read.
135-
*
136-
* @param parser a parser object.
137-
* @param strict a strict object.
138-
* @throws IOException IOException if any.
139-
* @throws XmlPullParserException XmlPullParserException if
140-
* any.
141-
* @return Settings
142-
*/
14399
public Settings read(XMLStreamReader parser, boolean strict) throws IOException, XmlPullParserException {
144100
try {
145101
return new Settings(delegate.read(parser, strict, null));

compat/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/ToolchainsParseException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import java.io.IOException;
2222

2323
/**
24-
* Signals a failure to parse the toolchains due to invalid syntax (e.g. non well formed XML or unknown elements).
24+
* Signals a failure to parse the toolchains due to invalid syntax (e.g. non well-formed XML or unknown elements).
2525
*
2626
* @since 3.3.0
2727
*/

impl/maven-core/src/main/java/org/apache/maven/DefaultMaven.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,8 @@ private MavenExecutionResult doExecute(
276276
// because the participant is free to change the dependencies of a project which can potentially change the
277277
// topological order of the projects, and therefore can potentially change the build order.
278278
//
279-
// Note that participants may affect the topological order of the projects but it is
279+
// Note that participants may affect the topological order of the projects, but it is
280280
// not expected that a participant will add or remove projects from the session.
281-
//
282281

283282
graphResult = buildGraph(session);
284283

impl/maven-core/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ private Artifact createArtifact(
162162
} else if (Artifact.SCOPE_TEST.equals(scope) || Artifact.SCOPE_PROVIDED.equals(scope)) {
163163
return null;
164164
} else if (Artifact.SCOPE_COMPILE.equals(scope) && Artifact.SCOPE_COMPILE.equals(inheritedScope)) {
165-
// added to retain compile artifactScope. Remove if you want compile inherited as runtime
165+
// added to retain compile artifactScope. Remove if you want to compile inherited as runtime
166166
desiredScope = Artifact.SCOPE_COMPILE;
167167
}
168168

0 commit comments

Comments
 (0)