Fix Javadoc warnings

This commit is contained in:
Gary Gregory 2024-07-31 08:51:04 -04:00
parent 6bd90026ca
commit 4bc3fb504e
23 changed files with 159 additions and 17 deletions

View File

@ -58,6 +58,7 @@ The <action> type attribute can be add,update,fix,remove.
<action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate Conversion constructor for removal.</action>
<action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate EntityArrays constructor for removal.</action>
<action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate ObjectToStringComparator constructor for removal.</action>
<action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate RuntimeEnvironment constructor for removal.</action>
<!-- ADD -->
<action type="add" dev="ggregory" due-to="Gary Gregory">Add StopWatch.getSplitDuration() and deprecate getSplitTime().</action>
<action type="add" dev="ggregory" due-to="Gary Gregory">Add StopWatch.getStartInstant() and deprecate getStartTime().</action>

View File

@ -27,16 +27,6 @@ import java.util.Comparator;
*/
public class ArraySorter {
/**
* Constructs a new instance.
*
* @deprecated Will be removed in 4.0.0.
*/
@Deprecated
public ArraySorter() {
// empty
}
/**
* Sorts and returns the given array.
*
@ -167,4 +157,14 @@ public class ArraySorter {
return array;
}
/**
* Constructs a new instance.
*
* @deprecated Will be removed in 4.0.0.
*/
@Deprecated
public ArraySorter() {
// empty
}
}

View File

@ -655,4 +655,11 @@ public class Functions {
final FailableRunnable<? extends Throwable>... resources) {
tryWithResources(action, null, resources);
}
/**
* Constructs a new instance.
*/
public Functions() {
// empty
}
}

View File

@ -92,4 +92,13 @@ public class RuntimeEnvironment {
return containsLine("/proc/1/environ", "container=wslcontainer_host_id");
}
/**
* Constructs a new instance.
*
* @deprecated Will be removed in 4.0.0.
*/
@Deprecated
public RuntimeEnvironment() {
// empty
}
}

View File

@ -548,4 +548,11 @@ public class Streams {
public static <O> Collector<O, ?, O[]> toArray(final Class<O> pElementType) {
return new ArrayCollector<>(pElementType);
}
/**
* Constructs a new instance.
*/
public Streams() {
// empty
}
}

View File

@ -29,6 +29,13 @@ import org.apache.commons.lang3.function.FailableSupplier;
*/
public abstract class AbstractSupplier<T, B extends AbstractSupplier<T, B, E>, E extends Throwable> implements FailableSupplier<T, E> {
/**
* Constructs a new instance.
*/
public AbstractSupplier() {
// empty
}
/**
* Returns this instance typed as the proper subclass type.
*

View File

@ -87,6 +87,13 @@ public class DiffBuilder<T> implements Builder<DiffResult<T>> {
private boolean testObjectsEquals = true;
private String toStringFormat = TO_STRING_FORMAT;
/**
* Constructs a new instance.
*/
public Builder() {
// empty
}
/**
* Builds a new configured {@link DiffBuilder}.
*

View File

@ -86,6 +86,13 @@ public class ReflectionDiffBuilder<T> implements Builder<DiffResult<T>> {
private String[] excludeFieldNames = ArrayUtils.EMPTY_STRING_ARRAY;
private DiffBuilder<T> diffBuilder;
/**
* Constructs a new instance.
*/
public Builder() {
// empty
}
/**
* Builds a new configured {@link ReflectionDiffBuilder}.
*

View File

@ -54,6 +54,13 @@ public abstract class AbstractConcurrentInitializer<T, E extends Exception> impl
*/
private FailableSupplier<T, ? extends Exception> initializer = FailableSupplier.nul();
/**
* Constructs a new instance.
*/
public AbstractBuilder() {
// empty
}
/**
* Gets the closer consumer called by {@link #close()}.
*

View File

@ -76,6 +76,13 @@ public class AtomicInitializer<T> extends AbstractConcurrentInitializer<T, Concu
*/
public static class Builder<I extends AtomicInitializer<T>, T> extends AbstractBuilder<I, T, Builder<I, T>, ConcurrentException> {
/**
* Constructs a new instance.
*/
public Builder() {
// empty
}
@SuppressWarnings("unchecked")
@Override
public I get() {

View File

@ -65,6 +65,13 @@ public class AtomicSafeInitializer<T> extends AbstractConcurrentInitializer<T, C
*/
public static class Builder<I extends AtomicSafeInitializer<T>, T> extends AbstractBuilder<I, T, Builder<I, T>, ConcurrentException> {
/**
* Constructs a new instance.
*/
public Builder() {
// empty
}
@SuppressWarnings("unchecked")
@Override
public I get() {

View File

@ -101,6 +101,13 @@ public class BackgroundInitializer<T> extends AbstractConcurrentInitializer<T, E
*/
private ExecutorService externalExecutor;
/**
* Constructs a new instance.
*/
public Builder() {
// empty
}
@SuppressWarnings("unchecked")
@Override
public I get() {

View File

@ -100,8 +100,7 @@ public class BasicThreadFactory implements ThreadFactory {
* BasicThreadFactory} for a usage example.
* </p>
*/
public static class Builder
implements org.apache.commons.lang3.builder.Builder<BasicThreadFactory> {
public static class Builder implements org.apache.commons.lang3.builder.Builder<BasicThreadFactory> {
/** The wrapped factory. */
private ThreadFactory factory;
@ -118,6 +117,13 @@ public class BasicThreadFactory implements ThreadFactory {
/** The daemon flag. */
private Boolean daemon;
/**
* Constructs a new instance.
*/
public Builder() {
// empty
}
/**
* Creates a new {@link BasicThreadFactory} with all configuration
* options that have been specified by calling methods on this builder.

View File

@ -80,6 +80,13 @@ public class LazyInitializer<T> extends AbstractConcurrentInitializer<T, Concurr
*/
public static class Builder<I extends LazyInitializer<T>, T> extends AbstractBuilder<I, T, Builder<I, T>, ConcurrentException> {
/**
* Constructs a new instance.
*/
public Builder() {
// empty
}
@SuppressWarnings("unchecked")
@Override
public I get() {

View File

@ -47,6 +47,13 @@ public class DefaultExceptionContext implements ExceptionContext, Serializable {
/** The list storing the label-data pairs. */
private final List<Pair<String, Object>> contextValues = new ArrayList<>();
/**
* Constructs a new instance.
*/
public DefaultExceptionContext() {
// empty
}
/**
* {@inheritDoc}
*/

View File

@ -834,18 +834,18 @@ public class Streams {
/**
* Returns a {@link Collector} that accumulates the input elements into a new array.
*
* @param pElementType Type of an element in the array.
* @param elementType Type of an element in the array.
* @param <T> the type of the input elements
* @return a {@link Collector} which collects all the input elements into an array, in encounter order
*/
public static <T> Collector<T, ?, T[]> toArray(final Class<T> pElementType) {
return new ArrayCollector<>(pElementType);
public static <T> Collector<T, ?, T[]> toArray(final Class<T> elementType) {
return new ArrayCollector<>(elementType);
}
/**
* Make private in 4.0.
* Constructs a new instance.
*
* @deprecated TODO Make private in 4.0.
* @deprecated Will be private in 4.0.0.
*/
@Deprecated
public Streams() {

View File

@ -51,6 +51,13 @@ public abstract class CharSequenceTranslator {
return Integer.toHexString(codePoint).toUpperCase(Locale.ENGLISH);
}
/**
* Constructs a new instance.
*/
public CharSequenceTranslator() {
// empty
}
/**
* Helper for non-Writer usage.
* @param input CharSequence to be translated

View File

@ -31,6 +31,13 @@ import java.io.Writer;
@Deprecated
public abstract class CodePointTranslator extends CharSequenceTranslator {
/**
* Constructs a new instance.
*/
public CodePointTranslator() {
// empty
}
/**
* Implements translate to map onto the abstract translate(int, Writer) method.
* {@inheritDoc}

View File

@ -35,6 +35,13 @@ import java.io.Writer;
@Deprecated
public class OctalUnescaper extends CharSequenceTranslator {
/**
* Constructs a new instance.
*/
public OctalUnescaper() {
// empty
}
/**
* Checks if the given char is an octal digit. Octal digits are the character representations of the digits 0 to 7.
* @param ch the char to check

View File

@ -32,6 +32,13 @@ import java.io.Writer;
@Deprecated
public class UnicodeUnescaper extends CharSequenceTranslator {
/**
* Constructs a new instance.
*/
public UnicodeUnescaper() {
// empty
}
/**
* {@inheritDoc}
*/

View File

@ -29,6 +29,13 @@ import java.io.Writer;
@Deprecated
public class UnicodeUnpairedSurrogateRemover extends CodePointTranslator {
/**
* Constructs a new instance.
*/
public UnicodeUnpairedSurrogateRemover() {
// empty
}
/**
* Implements translate that throws out unpaired surrogates.
* {@inheritDoc}

View File

@ -119,6 +119,13 @@ public abstract class Pair<L, R> implements Map.Entry<L, R>, Comparable<Pair<L,
return ImmutablePair.ofNonNull(left, right);
}
/**
* Constructs a new instance.
*/
public Pair() {
// empty
}
/**
* Accepts this key and value as arguments to the given consumer.
*

View File

@ -105,6 +105,13 @@ public abstract class Triple<L, M, R> implements Comparable<Triple<L, M, R>>, Se
return ImmutableTriple.ofNonNull(left, middle, right);
}
/**
* Constructs a new instance.
*/
public Triple() {
// empty
}
/**
* Compares the triple based on the left element, followed by the middle element,
* finally the right element.