From 2a37866e50d71ddf694f010b6d8d3a907a3ca015 Mon Sep 17 00:00:00 2001
From: Gary Gregory
- * The format used is ISO 8601-like, [message ]hours:minutes:seconds.milliseconds.
+ * The format used is ISO 8601-like, [message ]hours:minutes:seconds.milliseconds.
*
- * The format used is ISO 8601-like, [message ]hours:minutes:seconds.milliseconds.
+ * The format used is ISO 8601-like, [message ]hours:minutes:seconds.milliseconds.
*
* This method is the counter part of {@code primitiveToWrapper()}. If the passed in class is a wrapper class for a * primitive type, this primitive type will be returned (e.g. {@code Integer.TYPE} for {@code Integer.class}). For other - * classes, or if the parameter is null, the return value is null. + * classes, or if the parameter is null, the return value is null. *
* - * @param cls the class to convert, may be null - * @return the corresponding primitive type if {@code cls} is a wrapper class, null otherwise + * @param cls the class to convert, may be null + * @return the corresponding primitive type if {@code cls} is a wrapper class, null otherwise * @see #primitiveToWrapper(Class) * @since 2.4 */ diff --git a/src/main/java/org/apache/commons/lang3/JavaVersion.java b/src/main/java/org/apache/commons/lang3/JavaVersion.java index 48ffb29edd5..dcda2c720e2 100644 --- a/src/main/java/org/apache/commons/lang3/JavaVersion.java +++ b/src/main/java/org/apache/commons/lang3/JavaVersion.java @@ -201,7 +201,7 @@ public enum JavaVersion { * internally. * * @param versionStr the Java version as string - * @return the corresponding enumeration constant or null if the + * @return the corresponding enumeration constant or null if the * version is unknown */ static JavaVersion get(final String versionStr) { @@ -278,7 +278,7 @@ static JavaVersion get(final String versionStr) { * internally. * * @param versionStr the Java version as string - * @return the corresponding enumeration constant or null if the + * @return the corresponding enumeration constant or null if the * version is unknown */ static JavaVersion getJavaVersion(final String versionStr) { diff --git a/src/main/java/org/apache/commons/lang3/RandomStringUtils.java b/src/main/java/org/apache/commons/lang3/RandomStringUtils.java index 07f4706e52e..7a192da39bd 100644 --- a/src/main/java/org/apache/commons/lang3/RandomStringUtils.java +++ b/src/main/java/org/apache/commons/lang3/RandomStringUtils.java @@ -33,7 +33,7 @@ * the algorithms/providers specified in the {@code securerandom.strongAlgorithms} {@link Security} property. * *- * Use {@link #insecure()} to get the singleton instance based on {@link ThreadLocalRandom#current()} which is not cryptographically secure. In addition, + * Use {@link #insecure()} to get the singleton instance based on {@link ThreadLocalRandom#current()} which is not cryptographically secure. In addition, * instances do not use a cryptographically random seed unless the {@linkplain System#getProperty system property} {@code java.util.secureRandomSeed} is set to * {@code true}. *
diff --git a/src/main/java/org/apache/commons/lang3/RandomUtils.java b/src/main/java/org/apache/commons/lang3/RandomUtils.java index 7bca017704f..42a9c9fb842 100644 --- a/src/main/java/org/apache/commons/lang3/RandomUtils.java +++ b/src/main/java/org/apache/commons/lang3/RandomUtils.java @@ -36,7 +36,7 @@ * the algorithms/providers specified in the {@code securerandom.strongAlgorithms} {@link Security} property. * *- * Use {@link #insecure()} to get the singleton instance based on {@link ThreadLocalRandom#current()} which is not cryptographically secure. In addition, + * Use {@link #insecure()} to get the singleton instance based on {@link ThreadLocalRandom#current()} which is not cryptographically secure. In addition, * instances do not use a cryptographically random seed unless the {@linkplain System#getProperty system property} {@code java.util.secureRandomSeed} is set to * {@code true}. *
diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java b/src/main/java/org/apache/commons/lang3/StringUtils.java index 70c26ee315b..ec0cf511987 100644 --- a/src/main/java/org/apache/commons/lang3/StringUtils.java +++ b/src/main/java/org/apache/commons/lang3/StringUtils.java @@ -37,57 +37,57 @@ * {@code null} safe. * *Note: The code starts looking for a match at the start of the target, + *
Note: The code starts looking for a match at the start of the target, * incrementing the starting index by one after each successful match * (unless {@code searchStr} is an empty string in which case the position * is never incremented and {@code 0} is returned immediately). diff --git a/src/main/java/org/apache/commons/lang3/Strings.java b/src/main/java/org/apache/commons/lang3/Strings.java index 80e18c55cf4..504de96b1ff 100644 --- a/src/main/java/org/apache/commons/lang3/Strings.java +++ b/src/main/java/org/apache/commons/lang3/Strings.java @@ -263,12 +263,12 @@ public int lastIndexOf(final CharSequence seq, final CharSequence searchSeq, fin } /** - * The Case-Insensitive singleton instance. + * The Case-Insensitive singleton instance. */ public static final Strings CI = new CiStrings(true); /** - * The Case-Snsensitive singleton instance. + * The Case-Snsensitive singleton instance. */ public static final Strings CS = new CsStrings(true); diff --git a/src/main/java/org/apache/commons/lang3/SystemUtils.java b/src/main/java/org/apache/commons/lang3/SystemUtils.java index bec5a5d4226..55486f1f053 100644 --- a/src/main/java/org/apache/commons/lang3/SystemUtils.java +++ b/src/main/java/org/apache/commons/lang3/SystemUtils.java @@ -1911,7 +1911,7 @@ public class SystemUtils { * Holds a class name, on Windows XP this is {@code sun.awt.windows.WToolkit}. *
*- * On platforms without a GUI, this value is {@code null}. + * On platforms without a GUI, this value is {@code null}. *
** Defaults to {@code null} if the runtime does not have security access to read this property or the property does diff --git a/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java b/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java index b0c38202570..31b1e1f6ef8 100644 --- a/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java +++ b/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java @@ -92,7 +92,7 @@ *
* *- * Note: the default {@link ToStringStyle} will only do a "shallow" formatting, i.e. composed objects are not + * Note: the default {@link ToStringStyle} will only do a "shallow" formatting, i.e. composed objects are not * further traversed. To get "deep" formatting, use an instance of {@link RecursiveToStringStyle}. *
* diff --git a/src/main/java/org/apache/commons/lang3/concurrent/BackgroundInitializer.java b/src/main/java/org/apache/commons/lang3/concurrent/BackgroundInitializer.java index 613c85fb1e4..4c7191a839f 100644 --- a/src/main/java/org/apache/commons/lang3/concurrent/BackgroundInitializer.java +++ b/src/main/java/org/apache/commons/lang3/concurrent/BackgroundInitializer.java @@ -271,7 +271,7 @@ public T get() throws ConcurrentException { /** * Returns the {@link ExecutorService} that is actually used for executing * the background task. This method can be called after {@link #start()} - * (before {@code start()} it returns null). If an external executor + * (before {@code start()} it returns null). If an external executor * was set, this is also the active executor. Otherwise this method returns * the temporary executor that was created by this object. * @@ -392,8 +392,8 @@ public final synchronized void setExternalExecutor( * becomes active and invokes the {@link #initialize()} method in a * background task. A {@link BackgroundInitializer} can be started exactly * once. The return value of this method determines whether the start was - * successful: only the first invocation of this method returns true, - * following invocations will return false. + * successful: only the first invocation of this method returns true, + * following invocations will return false. * * @return a flag whether the initializer could be started successfully */ diff --git a/src/main/java/org/apache/commons/lang3/concurrent/BasicThreadFactory.java b/src/main/java/org/apache/commons/lang3/concurrent/BasicThreadFactory.java index 1ba5d4f9a45..aa0c9e24a5e 100644 --- a/src/main/java/org/apache/commons/lang3/concurrent/BasicThreadFactory.java +++ b/src/main/java/org/apache/commons/lang3/concurrent/BasicThreadFactory.java @@ -140,7 +140,7 @@ public BasicThreadFactory build() { /** * Sets the daemon flag for the new {@link BasicThreadFactory}. If this - * flag is set to true the new thread factory will create daemon + * flag is set to true the new thread factory will create daemon * threads. * * @param daemon the value of the daemon flag @@ -155,9 +155,9 @@ public Builder daemon(final boolean daemon) { * Sets the naming pattern to be used by the new {@code * BasicThreadFactory}. * - * @param namingPattern the naming pattern (must not be null) + * @param namingPattern the naming pattern (must not be null) * @return a reference to this {@link Builder} - * @throws NullPointerException if the naming pattern is null + * @throws NullPointerException if the naming pattern is null */ public Builder namingPattern(final String namingPattern) { this.namingPattern = Objects.requireNonNull(namingPattern, "pattern"); @@ -195,9 +195,9 @@ public void reset() { * new {@link BasicThreadFactory}. * * @param exceptionHandler the {@link UncaughtExceptionHandler} (must not be - * null) + * null) * @return a reference to this {@link Builder} - * @throws NullPointerException if the exception handler is null + * @throws NullPointerException if the exception handler is null */ public Builder uncaughtExceptionHandler( final Thread.UncaughtExceptionHandler exceptionHandler) { @@ -210,10 +210,10 @@ public Builder uncaughtExceptionHandler( * BasicThreadFactory}. * * @param factory the wrapped {@link ThreadFactory} (must not be - * null) + * null) * @return a reference to this {@link Builder} * @throws NullPointerException if the passed in {@link ThreadFactory} - * is null + * is null */ public Builder wrappedFactory(final ThreadFactory factory) { this.factory = Objects.requireNonNull(factory, "factory"); @@ -256,9 +256,9 @@ private BasicThreadFactory(final Builder builder) { /** * Gets the daemon flag. This flag determines whether newly created - * threads should be daemon threads. If true, this factory object + * threads should be daemon threads. If true, this factory object * calls {@code setDaemon(true)} on the newly created threads. Result can be - * null if no daemon flag was provided at creation time. + * null if no daemon flag was provided at creation time. * * @return the daemon flag */ @@ -268,7 +268,7 @@ public final Boolean getDaemonFlag() { /** * Gets the naming pattern for naming newly created threads. Result can - * be null if no naming pattern was provided. + * be null if no naming pattern was provided. * * @return the naming pattern */ @@ -278,7 +278,7 @@ public final String getNamingPattern() { /** * Gets the priority of the threads created by this factory. Result can - * be null if no priority was specified. + * be null if no priority was specified. * * @return the priority for newly created threads */ @@ -299,7 +299,7 @@ public long getThreadCount() { /** * Gets the {@link UncaughtExceptionHandler} for the threads created by - * this factory. Result can be null if no handler was provided. + * this factory. Result can be null if no handler was provided. * * @return the {@link UncaughtExceptionHandler} */ @@ -309,7 +309,7 @@ public final Thread.UncaughtExceptionHandler getUncaughtExceptionHandler() { /** * Gets the wrapped {@link ThreadFactory}. This factory is used for - * actually creating threads. This method never returns null. If no + * actually creating threads. This method never returns null. If no * {@link ThreadFactory} was passed when this object was created, a default * thread factory is returned. * diff --git a/src/main/java/org/apache/commons/lang3/concurrent/CallableBackgroundInitializer.java b/src/main/java/org/apache/commons/lang3/concurrent/CallableBackgroundInitializer.java index ade5533ab87..c856f95e5ea 100644 --- a/src/main/java/org/apache/commons/lang3/concurrent/CallableBackgroundInitializer.java +++ b/src/main/java/org/apache/commons/lang3/concurrent/CallableBackgroundInitializer.java @@ -72,8 +72,8 @@ public class CallableBackgroundInitializer- * This method is null-safe: It accepts a null map as input + * This method is null-safe: It accepts a null map as input * without throwing an exception. In this case the return value is - * null, too. + * null, too. *
* * @param* If multiple threads call the {@code get()} method when the object has not yet been created, they are blocked until initialization completes. The algorithm * guarantees that only a single instance of the wrapped object class is created, which is passed to all callers. Once initialized, calls to the {@code get()} - * method are pretty fast because no synchronization is needed (only an access to a volatile member field). + * method are pretty fast because no synchronization is needed (only an access to a volatile member field). *
* * @since 3.0 diff --git a/src/main/java/org/apache/commons/lang3/concurrent/MultiBackgroundInitializer.java b/src/main/java/org/apache/commons/lang3/concurrent/MultiBackgroundInitializer.java index b4bf4174074..af08c7daf97 100644 --- a/src/main/java/org/apache/commons/lang3/concurrent/MultiBackgroundInitializer.java +++ b/src/main/java/org/apache/commons/lang3/concurrent/MultiBackgroundInitializer.java @@ -158,7 +158,7 @@ private BackgroundInitializer> checkName(final String name) { * Returns the {@link ConcurrentException} object that was thrown by the * {@link BackgroundInitializer} with the given name. If this * initializer did not throw an exception, the return value is - * null. If the name cannot be resolved, an exception is thrown. + * null. If the name cannot be resolved, an exception is thrown. * * @param name the name of the {@link BackgroundInitializer} * @return the exception thrown by this initializer @@ -185,7 +185,7 @@ public BackgroundInitializer> getInitializer(final String name) { * Returns the result object produced by the {@code * BackgroundInitializer} with the given name. This is the object * returned by the initializer's {@code initialize()} method. If this - * {@link BackgroundInitializer} caused an exception, null is + * {@link BackgroundInitializer} caused an exception, null is * returned. If the name cannot be resolved, an exception is thrown. * * @param name the name of the {@link BackgroundInitializer} @@ -259,9 +259,9 @@ public MultiBackgroundInitializer(final ExecutorService exec) { * be processed. This method must not be called after {@link #start()} has * been invoked. * - * @param name the name of the initializer (must not be null) + * @param name the name of the initializer (must not be null) * @param backgroundInitializer the {@link BackgroundInitializer} to add (must not be - * null) + * null) * @throws NullPointerException if either {@code name} or {@code backgroundInitializer} * is {@code null} * @throws IllegalStateException if {@code start()} has already been called diff --git a/src/main/java/org/apache/commons/lang3/concurrent/TimedSemaphore.java b/src/main/java/org/apache/commons/lang3/concurrent/TimedSemaphore.java index 540c33c4568..e7ba70081d0 100644 --- a/src/main/java/org/apache/commons/lang3/concurrent/TimedSemaphore.java +++ b/src/main/java/org/apache/commons/lang3/concurrent/TimedSemaphore.java @@ -200,7 +200,7 @@ public TimedSemaphore(final long timePeriod, final TimeUnit timeUnit, final int * Creates a new instance of {@link TimedSemaphore} and initializes it with * an executor service, the given time period, and the limit. The executor * service will be used for creating a periodic task for monitoring the time - * period. It can be null, then a default service will be created. + * period. It can be null, then a default service will be created. * * @param service the executor service * @param timePeriod the time period @@ -377,7 +377,7 @@ public TimeUnit getUnit() { /** * Tests whether the {@link #shutdown()} method has been called on this - * object. If this method returns true, this instance cannot be used + * object. If this method returns true, this instance cannot be used * any longer. * * @return a flag whether a shutdown has been performed diff --git a/src/main/java/org/apache/commons/lang3/exception/DefaultExceptionContext.java b/src/main/java/org/apache/commons/lang3/exception/DefaultExceptionContext.java index cb9f182fa4c..d727e185a5c 100644 --- a/src/main/java/org/apache/commons/lang3/exception/DefaultExceptionContext.java +++ b/src/main/java/org/apache/commons/lang3/exception/DefaultExceptionContext.java @@ -98,8 +98,8 @@ public Object getFirstContextValue(final String label) { /** * Builds the message containing the contextual information. * - * @param baseMessage the base exception message without context information appended - * @return the exception message with context information appended, never null + * @param baseMessage the base exception message without context information appended + * @return the exception message with context information appended, never null */ @Override public String getFormattedExceptionMessage(final String baseMessage) { diff --git a/src/main/java/org/apache/commons/lang3/exception/ExceptionContext.java b/src/main/java/org/apache/commons/lang3/exception/ExceptionContext.java index 121f8f466a5..6c45612fa6e 100644 --- a/src/main/java/org/apache/commons/lang3/exception/ExceptionContext.java +++ b/src/main/java/org/apache/commons/lang3/exception/ExceptionContext.java @@ -82,8 +82,8 @@ public interface ExceptionContext { * Gets the contextualized error message based on a base message. * This will add the context label-value pairs to the message. * - * @param baseMessage the base exception message without context information appended - * @return the exception message with context information appended, not {@code null} + * @param baseMessage the base exception message without context information appended + * @return the exception message with context information appended, not {@code null} */ String getFormattedExceptionMessage(String baseMessage); diff --git a/src/main/java/org/apache/commons/lang3/text/ExtendedMessageFormat.java b/src/main/java/org/apache/commons/lang3/text/ExtendedMessageFormat.java index 8fedbe16739..32d73936e03 100644 --- a/src/main/java/org/apache/commons/lang3/text/ExtendedMessageFormat.java +++ b/src/main/java/org/apache/commons/lang3/text/ExtendedMessageFormat.java @@ -37,9 +37,9 @@ * parsed from the message pattern. In this way custom patterns can be specified, * and the formats supported by {@link java.text.MessageFormat} can be overridden * at the format and/or format style level (see MessageFormat). A "format element" - * embedded in the message pattern is specified (()? signifies optionality):{
argument-number({@code ,}format-name
- * ({@code ,}format-style)?)?}
+ * embedded in the message pattern is specified (()? signifies optionality):{
argument-number({@code ,}format-name
+ * ({@code ,}format-style)?)?}
*
* * format-name and format-style values are trimmed of surrounding whitespace @@ -50,7 +50,7 @@ * found is used for this format element. *
* - *NOTICE: The various subformat mutator methods are considered unnecessary; they exist on the parent + *
NOTICE: The various subformat mutator methods are considered unnecessary; they exist on the parent * class to allow the type of customization which it is the job of this class to provide in * a configurable fashion. These methods have thus been disabled and will throw * {@link UnsupportedOperationException} if called. diff --git a/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java b/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java index 7b97f15a53b..7f85de30fcb 100644 --- a/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java +++ b/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java @@ -134,10 +134,10 @@ * {@link StrSubstitutor} supports this recursive substitution in variable * names, but it has to be enabled explicitly by setting the * {@link #setEnableSubstitutionInVariables(boolean) enableSubstitutionInVariables} - * property to true. + * property to true. *
*- * This class is not thread safe. + * This class is not thread safe. *
* * @since 2.2 @@ -862,7 +862,7 @@ public boolean replaceIn(final StringBuilder source, final int offset, final int * @param buf the buffer where the substitution is occurring, not null * @param startPos the start position of the variable including the prefix, valid * @param endPos the end position of the variable including the suffix, valid - * @return the variable's value or null if the variable is unknown + * @return the variable's value or null if the variable is unknown */ protected String resolveVariable(final String variableName, final StrBuilder buf, final int startPos, final int endPos) { final StrLookup> resolver = getVariableResolver(); @@ -874,9 +874,9 @@ protected String resolveVariable(final String variableName, final StrBuilder buf /** * Sets a flag whether substitution is done in variable names. If set to - * true, the names of variables can contain other variables which are + * true, the names of variables can contain other variables which are * processed first before the original variable is evaluated, e.g. - * {@code ${jre-${java.version}}}. The default value is false. + * {@code ${jre-${java.version}}}. The default value is false. * * @param enableSubstitutionInVariables the new value of the flag * @since 3.0 @@ -899,12 +899,12 @@ public void setEscapeChar(final char escapeCharacter) { /** * Sets a flag controlling whether escapes are preserved during - * substitution. If set to true, the escape character is retained + * substitution. If set to true, the escape character is retained * during substitution (e.g. {@code $${this-is-escaped}} remains - * {@code $${this-is-escaped}}). If set to false, the escape + * {@code $${this-is-escaped}}). If set to false, the escape * character is removed during substitution (e.g. * {@code $${this-is-escaped}} becomes - * {@code ${this-is-escaped}}). The default value is false + * {@code ${this-is-escaped}}). The default value is false * * @param preserveEscapes true if escapes are to be preserved * @since 3.5 diff --git a/src/main/java/org/apache/commons/lang3/text/package-info.java b/src/main/java/org/apache/commons/lang3/text/package-info.java index f0dbe25e7ae..ec44fe5bf46 100644 --- a/src/main/java/org/apache/commons/lang3/text/package-info.java +++ b/src/main/java/org/apache/commons/lang3/text/package-info.java @@ -26,7 +26,7 @@ * ensure we don't clash with any current or future standard Java classes. * *- * Deprecated As of 3.6, use the Apache Commons Text + * Deprecated As of 3.6, use the Apache Commons Text * text package. *
* diff --git a/src/main/java/org/apache/commons/lang3/text/translate/package-info.java b/src/main/java/org/apache/commons/lang3/text/translate/package-info.java index 1f959e33fa9..05ce03aa25e 100644 --- a/src/main/java/org/apache/commons/lang3/text/translate/package-info.java +++ b/src/main/java/org/apache/commons/lang3/text/translate/package-info.java @@ -22,7 +22,7 @@ * These classes are immutable, and therefore thread-safe. * *- * Deprecated As of 3.6, use the Apache Commons Text + * Deprecated As of 3.6, use the Apache Commons Text * translate package. *
* diff --git a/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java b/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java index 2c7d0c13448..38ab0ac7238 100644 --- a/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java +++ b/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java @@ -45,7 +45,7 @@ *
* Notes on Optional Tokens:
- * Multiple optional tokens without literals can result in impossible to understand output.
- * Patterns where all tokens are optional can produce empty strings.
+ * Multiple optional tokens without literals can result in impossible to understand output.
+ * Patterns where all tokens are optional can produce empty strings.
* (See examples below)
*