Fix typos in code and documentation

See gh-31734
This commit is contained in:
Marc Wrobel
2022-07-14 15:10:20 +02:00
committed by Phillip Webb
parent 4bcec6e0ee
commit dbfc6bded4
59 changed files with 102 additions and 107 deletions

View File

@@ -98,7 +98,7 @@ public class ImageArchive implements TarArchive {
}
/**
* Return the create data of the archive.
* Return the create date of the archive.
* @return the create date
*/
public Instant getCreateDate() {

View File

@@ -72,7 +72,7 @@ public final class VolumeName {
* Factory method to create a new {@link VolumeName} with a random name.
* @param prefix the prefix to use with the random name
* @param randomLength the number of chars in the random part of the name
* @return a randomly volume reference
* @return a randomly named volume reference
*/
public static VolumeName random(String prefix, int randomLength) {
return of(RandomString.generate(prefix, randomLength));

View File

@@ -632,13 +632,13 @@ public class JSONArray {
}
/**
* Encodes this array as a human readable JSON string for debugging, such as: <pre>
* Encodes this array as a human-readable JSON string for debugging, such as: <pre>
* [
* 94043,
* 90210
* ]</pre>
* @param indentSpaces the number of spaces to indent for each level of nesting.
* @return a human readable JSON string of this array
* @return a human-readable JSON string of this array
* @throws JSONException if processing of json failed
*/
public String toString(int indentSpaces) throws JSONException {

View File

@@ -708,7 +708,7 @@ public class JSONObject {
}
/**
* Encodes this object as a human readable JSON string for debugging, such as: <pre>
* Encodes this object as a human-readable JSON string for debugging, such as: <pre>
* {
* "query": "Pizza",
* "locations": [

View File

@@ -64,7 +64,7 @@ public class JSONStringer {
/**
* Lexical scoping elements within this stringer, necessary to insert the appropriate
* separator characters (ie. commas and colons) and to detect nesting errors.
* separator characters (i.e. commas and colons) and to detect nesting errors.
*/
enum Scope {

View File

@@ -34,7 +34,7 @@ package org.springframework.boot.configurationprocessor.json;
* <p>
* For best interoperability and performance use JSON that complies with RFC 4627, such as
* that generated by {@link JSONStringer}. For legacy reasons this parser is lenient, so a
* successful parse does not indicate that the input string was valid JSON. All of the
* successful parse does not indicate that the input string was valid JSON. All the
* following syntax errors will be ignored:
* <ul>
* <li>End of line comments starting with {@code //} or {@code #} and ending with a

View File

@@ -375,8 +375,8 @@ public abstract class AbstractJarWriter implements LoaderClassesWriter {
}
/**
* An {@code UnpackHandler} determines whether or not unpacking is required and
* provides a SHA1 hash if required.
* An {@code UnpackHandler} determines whether unpacking is required and provides a
* SHA-1 hash if required.
*/
interface UnpackHandler {

View File

@@ -32,9 +32,9 @@ final class Digest {
}
/**
* Return the SHA1 digest from the supplied stream.
* Return the SHA-1 digest from the supplied stream.
* @param supplier the stream supplier
* @return the SHA1 digest
* @return the SHA-1 digest
* @throws IOException on IO error
*/
static String sha1(InputStreamSupplier supplier) throws IOException {

View File

@@ -52,7 +52,7 @@ public abstract class FileUtils {
}
/**
* Generate a SHA.1 Hash for a given file.
* Generate a SHA-1 Hash for a given file.
* @param file the file to hash
* @return the hash value as a String
* @throws IOException if the file cannot be read

View File

@@ -163,8 +163,8 @@ public abstract class Packager {
}
/**
* Sets the {@link File} to use to backup the original source.
* @param backupFile the file to use to backup the original source
* Sets the {@link File} to use to back up the original source.
* @param backupFile the file to use to back up the original source
*/
protected void setBackupFile(File backupFile) {
this.backupFile = backupFile;
@@ -320,8 +320,8 @@ public abstract class Packager {
}
/**
* Return the {@link File} to use to backup the original source.
* @return the file to use to backup the original source
* Return the {@link File} to use to back up the original source.
* @return the file to use to back up the original source
*/
public final File getBackupFile() {
if (this.backupFile != null) {

View File

@@ -145,7 +145,7 @@ public abstract class ExecutableArchiveLauncher extends Launcher {
protected abstract boolean isNestedArchive(Archive.Entry entry);
/**
* Return if post processing needs to be applied to the archives. For back
* Return if post-processing needs to be applied to the archives. For back
* compatibility this method returns {@code true}, but subclasses that don't override
* {@link #postProcessClassPathArchives(List)} should provide an implementation that
* returns {@code false}.
@@ -160,7 +160,7 @@ public abstract class ExecutableArchiveLauncher extends Launcher {
* Called to post-process archive entries before they are used. Implementations can
* add and remove entries.
* @param archives the archives
* @throws Exception if the post processing fails
* @throws Exception if the post-processing fails
* @see #isPostProcessingClassPathArchives()
*/
protected void postProcessClassPathArchives(List<Archive> archives) throws Exception {

View File

@@ -127,7 +127,7 @@ public class PropertiesLauncher extends Launcher {
public static final String CONFIG_LOCATION = "loader.config.location";
/**
* Properties key for boolean flag (default false) which if set will cause the
* Properties key for boolean flag (default false) which, if set, will cause the
* external configuration properties to be copied to System properties (assuming that
* is allowed by Java security).
*/

View File

@@ -281,8 +281,8 @@ public class BuildImageMojo extends AbstractPackagerMojo {
}
/**
* Return the {@link File} to use to backup the original source.
* @return the file to use to backup the original source
* Return the {@link File} to use to back up the original source.
* @return the file to use to back up the original source
*/
private File getBackupFile() {
Artifact source = getSourceArtifact(null);

View File

@@ -66,7 +66,7 @@ public class StopMojo extends AbstractMojo {
private String jmxName;
/**
* The port to use to lookup the platform MBeanServer if the application has been
* The port to use to look up the platform MBeanServer if the application has been
* forked.
*/
@Parameter(defaultValue = "9001")