Remove dead in-line comments.

This commit is contained in:
Gary Gregory 2021-07-10 09:59:59 -04:00
parent 929c5f6e68
commit b82f96ecbb
72 changed files with 0 additions and 514 deletions

View File

@ -100,7 +100,6 @@ public class AnnotationUtils {
public AnnotationUtils() {
}
//-----------------------------------------------------------------------
/**
* <p>Checks if two annotations are equal using the criteria for equality
* presented in the {@link Annotation#equals(Object)} API docs.</p>

View File

@ -1498,8 +1498,6 @@ public class ArrayUtils {
return array.clone();
}
// Clone
//-----------------------------------------------------------------------
/**
* <p>Shallow clones an array returning a typecast result and handling
* {@code null}.
@ -1701,7 +1699,6 @@ public class ArrayUtils {
return isArrayIndexValid(array, index) ? array[index] : defaultValue;
}
//-----------------------------------------------------------------------
/**
* <p>Returns the length of the specified array.
* This method can deal with {@code Object} arrays and with primitive arrays.
@ -2265,7 +2262,6 @@ public class ArrayUtils {
}
// boolean IndexOf
//-----------------------------------------------------------------------
/**
* <p>Finds the index of the given value in the array.
*
@ -2311,7 +2307,6 @@ public class ArrayUtils {
}
// byte IndexOf
//-----------------------------------------------------------------------
/**
* <p>Finds the index of the given value in the array.
*
@ -2356,7 +2351,6 @@ public class ArrayUtils {
}
// char IndexOf
//-----------------------------------------------------------------------
/**
* <p>Finds the index of the given value in the array.
*
@ -2403,7 +2397,6 @@ public class ArrayUtils {
}
// double IndexOf
//-----------------------------------------------------------------------
/**
* <p>Finds the index of the given value in the array.
*
@ -2501,7 +2494,6 @@ public class ArrayUtils {
}
// float IndexOf
//-----------------------------------------------------------------------
/**
* <p>Finds the index of the given value in the array.
*
@ -2548,7 +2540,6 @@ public class ArrayUtils {
}
// int IndexOf
//-----------------------------------------------------------------------
/**
* <p>Finds the index of the given value in the array.
*
@ -2593,7 +2584,6 @@ public static int indexOf(final int[] array, final int valueToFind, int startInd
}
// long IndexOf
//-----------------------------------------------------------------------
/**
* <p>Finds the index of the given value in the array.
*
@ -2638,7 +2628,6 @@ public static int indexOf(final int[] array, final int valueToFind, int startInd
}
// Object IndexOf
//-----------------------------------------------------------------------
/**
* <p>Finds the index of the given object in the array.
*
@ -2691,7 +2680,6 @@ public static int indexOf(final int[] array, final int valueToFind, int startInd
}
// short IndexOf
//-----------------------------------------------------------------------
/**
* <p>Finds the index of the given value in the array.
*
@ -4612,7 +4600,6 @@ public static int indexOf(final int[] array, final int valueToFind, int startInd
}
// nullToEmpty
//-----------------------------------------------------------------------
/**
* <p>Defensive programming technique to change a {@code null}
* reference to an empty one.
@ -7468,7 +7455,6 @@ public static int indexOf(final int[] array, final int valueToFind, int startInd
}
// Shift
//-----------------------------------------------------------------------
/**
* Shifts the order of the given array.
*
@ -8167,7 +8153,6 @@ public static int indexOf(final int[] array, final int valueToFind, int startInd
}
// Subarrays
//-----------------------------------------------------------------------
/**
* <p>Produces a new array containing the elements between
* the start and end indices.
@ -8711,7 +8696,6 @@ public static int indexOf(final int[] array, final int valueToFind, int startInd
}
// Swap
//-----------------------------------------------------------------------
/**
* Swaps two elements in the given array.
*
@ -8856,7 +8840,6 @@ public static int indexOf(final int[] array, final int valueToFind, int startInd
}
// Generic array
//-----------------------------------------------------------------------
/**
* <p>Create a type-safe generic array.
*
@ -8899,7 +8882,6 @@ public static int indexOf(final int[] array, final int valueToFind, int startInd
}
// To map
//-----------------------------------------------------------------------
/**
* <p>Converts the given array into a {@link java.util.Map}. Each element of the array
* must be either a {@link java.util.Map.Entry} or an Array, containing at least two
@ -9563,7 +9545,6 @@ public static int indexOf(final int[] array, final int valueToFind, int startInd
}
// Basic methods handling multi-dimensional arrays
//-----------------------------------------------------------------------
/**
* <p>Outputs an array as a String, treating {@code null} as an empty array.
*

View File

@ -137,7 +137,6 @@ final class CharRange implements Iterable<Character>, Serializable {
}
// Accessors
//-----------------------------------------------------------------------
/**
* <p>Gets the start character for this character range.</p>
*
@ -169,7 +168,6 @@ final class CharRange implements Iterable<Character>, Serializable {
}
// Contains
//-----------------------------------------------------------------------
/**
* <p>Is the character specified contained in this range.</p>
*
@ -203,7 +201,6 @@ final class CharRange implements Iterable<Character>, Serializable {
}
// Basics
//-----------------------------------------------------------------------
/**
* <p>Compares two CharRange objects, returning true if they represent
* exactly the same range of characters defined in the same way.</p>
@ -256,7 +253,6 @@ final class CharRange implements Iterable<Character>, Serializable {
}
// Expansions
//-----------------------------------------------------------------------
/**
* <p>Returns an iterator which can be used to walk through the characters described by this range.</p>
*

View File

@ -90,7 +90,6 @@ public class CharSet implements Serializable {
/** The set of CharRange objects. */
private final Set<CharRange> set = Collections.synchronizedSet(new HashSet<>());
//-----------------------------------------------------------------------
/**
* <p>Factory method to create a new CharSet using a special syntax.</p>
*
@ -165,7 +164,6 @@ public class CharSet implements Serializable {
return new CharSet(setStrs);
}
//-----------------------------------------------------------------------
/**
* <p>Constructs a new CharSet using the set syntax.
* Each string is merged in with the set.</p>
@ -179,7 +177,6 @@ public class CharSet implements Serializable {
}
}
//-----------------------------------------------------------------------
/**
* <p>Add a set definition string to the {@code CharSet}.</p>
*
@ -214,7 +211,6 @@ public class CharSet implements Serializable {
}
}
//-----------------------------------------------------------------------
/**
* <p>Gets the internal set as an array of CharRange objects.</p>
*
@ -227,7 +223,6 @@ public class CharSet implements Serializable {
return set.toArray(CharRange.EMPTY_ARRAY);
}
//-----------------------------------------------------------------------
/**
* <p>Does the {@code CharSet} contain the specified
* character {@code ch}.</p>
@ -247,7 +242,6 @@ public class CharSet implements Serializable {
}
// Basics
//-----------------------------------------------------------------------
/**
* <p>Compares two {@code CharSet} objects, returning true if they represent
* exactly the same set of characters defined in the same way.</p>

View File

@ -73,7 +73,6 @@ public class CharUtils {
public CharUtils() {
}
//-----------------------------------------------------------------------
/**
* <p>Converts the character to a Character.</p>
*
@ -118,7 +117,6 @@ public class CharUtils {
return Character.valueOf(str.charAt(0));
}
//-----------------------------------------------------------------------
/**
* <p>Converts the Character to a char throwing an exception for {@code null}.</p>
*
@ -157,7 +155,6 @@ public class CharUtils {
return ch.charValue();
}
//-----------------------------------------------------------------------
/**
* <p>Converts the String to a char using the first character, throwing
* an exception on empty Strings.</p>
@ -201,7 +198,6 @@ public class CharUtils {
return str.charAt(0);
}
//-----------------------------------------------------------------------
/**
* <p>Converts the character to the Integer it represents, throwing an
* exception if the character is not numeric.</p>
@ -291,7 +287,6 @@ public class CharUtils {
return toIntValue(ch.charValue(), defaultValue);
}
//-----------------------------------------------------------------------
/**
* <p>Converts the character to a String that contains the one character.</p>
*

View File

@ -169,7 +169,6 @@ public enum JavaVersion {
this.name = name;
}
//-----------------------------------------------------------------------
/**
* <p>Whether this version of Java is at least the version of Java passed in.</p>
*
@ -183,7 +182,6 @@ public enum JavaVersion {
return this.value >= requiredVersion.value;
}
//-----------------------------------------------------------------------
/**
* <p>Whether this version of Java is at most the version of Java passed in.</p>
*
@ -277,7 +275,6 @@ public enum JavaVersion {
}
}
//-----------------------------------------------------------------------
/**
* <p>The string value is overridden to return the standard name.</p>
*

View File

@ -602,7 +602,6 @@ public class ObjectUtils {
}
// Null-safe equals/hashCode
//-----------------------------------------------------------------------
/**
* <p>Compares two objects for equality, where either one or both
* objects may be {@code null}.</p>

View File

@ -54,7 +54,6 @@ public class RandomStringUtils {
}
// Random
//-----------------------------------------------------------------------
/**
* <p>Creates a random string whose length is the number of characters
* specified.</p>

View File

@ -605,7 +605,6 @@ public class StringEscapeUtils {
return ESCAPE_HTML3.translate(input);
}
//-----------------------------------------------------------------------
/**
* <p>Unescapes a string containing entity escapes to a string
* containing the actual Unicode characters corresponding to the
@ -641,7 +640,6 @@ public class StringEscapeUtils {
return UNESCAPE_HTML3.translate(input);
}
//-----------------------------------------------------------------------
/**
* <p>Escapes the characters in a {@code String} using XML entities.</p>
*
@ -729,7 +727,6 @@ public class StringEscapeUtils {
return ESCAPE_XML11.translate(input);
}
//-----------------------------------------------------------------------
/**
* <p>Unescapes a string containing XML entity escapes to a string
* containing the actual Unicode characters corresponding to the
@ -751,7 +748,6 @@ public class StringEscapeUtils {
return UNESCAPE_XML.translate(input);
}
//-----------------------------------------------------------------------
/**
* <p>Returns a {@code String} value for a CSV column enclosed in double quotes,

View File

@ -111,7 +111,6 @@ public class CompareToBuilder implements Builder<Integer> {
comparison = 0;
}
//-----------------------------------------------------------------------
/**
* <p>Compares two {@code Object}s via reflection.</p>
*
@ -336,7 +335,6 @@ public class CompareToBuilder implements Builder<Integer> {
}
}
//-----------------------------------------------------------------------
/**
* <p>Appends to the {@code builder} the {@code compareTo(Object)}
* result of the superclass.</p>
@ -353,7 +351,6 @@ public class CompareToBuilder implements Builder<Integer> {
return this;
}
//-----------------------------------------------------------------------
/**
* <p>Appends to the {@code builder} the comparison of
* two {@code Object}s.</p>
@ -606,7 +603,6 @@ public class CompareToBuilder implements Builder<Integer> {
return this;
}
//-----------------------------------------------------------------------
/**
* <p>Appends to the {@code builder} the deep comparison of
* two {@code Object} arrays.</p>
@ -999,7 +995,6 @@ public class CompareToBuilder implements Builder<Integer> {
return this;
}
//-----------------------------------------------------------------------
/**
* Returns a negative integer, a positive integer, or zero as
* the {@code builder} has judged the "left-hand" side

View File

@ -164,7 +164,6 @@ public class ConcurrentUtils {
}
}
//-----------------------------------------------------------------------
/**
* Invokes the specified {@code ConcurrentInitializer} and returns the
* object produced by the initializer. This method just invokes the {@code
@ -204,7 +203,6 @@ public class ConcurrentUtils {
}
}
//-----------------------------------------------------------------------
/**
* <p>
* Puts a value in the specified {@code ConcurrentMap} if the key is not yet
@ -305,7 +303,6 @@ public class ConcurrentUtils {
}
}
//-----------------------------------------------------------------------
/**
* <p>
* Gets an implementation of {@code Future} that is immediately done

View File

@ -152,7 +152,6 @@ public class ContextedException extends Exception implements ExceptionContext {
exceptionContext = context;
}
//-----------------------------------------------------------------------
/**
* Adds information helpful to a developer in diagnosing and correcting the problem.
* For the information to be meaningful, the value passed should have a reasonable

View File

@ -152,7 +152,6 @@ public class ContextedRuntimeException extends RuntimeException implements Excep
exceptionContext = context;
}
//-----------------------------------------------------------------------
/**
* Adds information helpful to a developer in diagnosing and correcting the problem.
* For the information to be meaningful, the value passed should have a reasonable

View File

@ -68,7 +68,6 @@ public class ExceptionUtils {
*/
static final String WRAPPED_MARKER = " [wrapped] ";
//-----------------------------------------------------------------------
/**
* <p>Introspects the {@code Throwable} to obtain the cause.</p>
*
@ -167,7 +166,6 @@ public class ExceptionUtils {
return null;
}
//-----------------------------------------------------------------------
/**
* <p>Returns the default names used when searching for the cause of an exception.</p>
*
@ -182,7 +180,6 @@ public class ExceptionUtils {
return ArrayUtils.clone(CAUSE_METHOD_NAMES);
}
//-----------------------------------------------------------------------
/**
* Gets a short message summarising the exception.
* <p>
@ -224,7 +221,6 @@ public class ExceptionUtils {
return list.isEmpty() ? null : list.get(list.size() - 1);
}
//-----------------------------------------------------------------------
/**
* Gets a short message summarising the root cause exception.
* <p>
@ -241,7 +237,6 @@ public class ExceptionUtils {
return getMessage(root);
}
//-----------------------------------------------------------------------
/**
* <p>Creates a compact stack trace for the root cause of the supplied
* {@code Throwable}.</p>
@ -311,7 +306,6 @@ public class ExceptionUtils {
return list;
}
//-----------------------------------------------------------------------
/**
* <p>Returns an array where each element is a line from the argument.</p>
*
@ -350,7 +344,6 @@ public class ExceptionUtils {
return getStackFrames(getStackTrace(throwable));
}
//-----------------------------------------------------------------------
/**
* <p>Gets the stack trace from a Throwable as a String.</p>
*
@ -370,7 +363,6 @@ public class ExceptionUtils {
return sw.getBuffer().toString();
}
//-----------------------------------------------------------------------
/**
* <p>Counts the number of {@code Throwable} objects in the
* exception chain.</p>
@ -586,7 +578,6 @@ public class ExceptionUtils {
return indexOf(throwable, type, fromIndex, true);
}
//-----------------------------------------------------------------------
/**
* <p>Prints a compact stack trace for the root cause of a throwable
* to {@code System.err}.</p>

View File

@ -95,7 +95,6 @@ public class NumberUtils {
public NumberUtils() {
}
//-----------------------------------------------------------------------
/**
* <p>Convert a {@code String} to an {@code int}, returning
* {@code zero} if the conversion fails.</p>
@ -339,7 +338,6 @@ public class NumberUtils {
return value == null ? defaultValue : value.doubleValue();
}
//-----------------------------------------------------------------------
/**
* <p>Convert a {@code String} to a {@code byte}, returning
* {@code zero} if the conversion fails.</p>
@ -593,7 +591,6 @@ public class NumberUtils {
);
}
//-----------------------------------------------------------------------
// must handle Long, Float, Integer, Float, Short,
// BigDecimal, BigInteger and Byte
// useful methods:
@ -898,7 +895,6 @@ public class NumberUtils {
return true;
}
//-----------------------------------------------------------------------
/**
* <p>Convert a {@code String} to a {@code Float}.</p>
*
@ -1350,7 +1346,6 @@ public class NumberUtils {
}
// 3 param min
//-----------------------------------------------------------------------
/**
* <p>Gets the minimum of three {@code long} values.</p>
*
@ -1456,7 +1451,6 @@ public class NumberUtils {
}
// 3 param max
//-----------------------------------------------------------------------
/**
* <p>Gets the maximum of three {@code long} values.</p>
*
@ -1561,7 +1555,6 @@ public class NumberUtils {
return Math.max(Math.max(a, b), c);
}
//-----------------------------------------------------------------------
/**
* <p>Checks whether the {@code String} contains only
* digit characters.</p>

View File

@ -66,7 +66,6 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl
this.value = value.booleanValue();
}
//-----------------------------------------------------------------------
/**
* Gets the value as a Boolean instance.
*
@ -115,7 +114,6 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl
this.value = value.booleanValue();
}
//-----------------------------------------------------------------------
/**
* Checks if the current value is {@code true}.
*
@ -136,7 +134,6 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl
return !value;
}
//-----------------------------------------------------------------------
/**
* Returns the value of this MutableBoolean as a boolean.
*
@ -146,7 +143,6 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl
return value;
}
//-----------------------------------------------------------------------
/**
* Gets this mutable as an instance of Boolean.
*
@ -157,7 +153,6 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl
return Boolean.valueOf(booleanValue());
}
//-----------------------------------------------------------------------
/**
* Compares this object to the specified object. The result is {@code true} if and only if the argument is
* not {@code null} and is an {@code MutableBoolean} object that contains the same
@ -184,7 +179,6 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl
return value ? Boolean.TRUE.hashCode() : Boolean.FALSE.hashCode();
}
//-----------------------------------------------------------------------
/**
* Compares this mutable to another in ascending order.
*
@ -197,7 +191,6 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl
return BooleanUtils.compare(this.value, other.value);
}
//-----------------------------------------------------------------------
/**
* Returns the String value of this mutable.
*

View File

@ -74,7 +74,6 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta
this.value = Byte.parseByte(value);
}
//-----------------------------------------------------------------------
/**
* Gets the value as a Byte instance.
*
@ -105,7 +104,6 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta
this.value = value.byteValue();
}
//-----------------------------------------------------------------------
/**
* Increments the value.
*
@ -174,7 +172,6 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta
return value;
}
//-----------------------------------------------------------------------
/**
* Adds a value to the value of this instance.
*
@ -273,7 +270,6 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta
return last;
}
//-----------------------------------------------------------------------
// shortValue relies on Number implementation
/**
* Returns the value of this MutableByte as a byte.
@ -325,7 +321,6 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta
return value;
}
//-----------------------------------------------------------------------
/**
* Gets this mutable as an instance of Byte.
*
@ -335,7 +330,6 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta
return Byte.valueOf(byteValue());
}
//-----------------------------------------------------------------------
/**
* Compares this object to the specified object. The result is {@code true} if and only if the argument is
* not {@code null} and is a {@code MutableByte} object that contains the same {@code byte} value
@ -362,7 +356,6 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta
return value;
}
//-----------------------------------------------------------------------
/**
* Compares this mutable to another in ascending order.
*
@ -374,7 +367,6 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta
return NumberUtils.compare(this.value, other.value);
}
//-----------------------------------------------------------------------
/**
* Returns the String value of this mutable.
*

View File

@ -72,7 +72,6 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>,
this.value = Double.parseDouble(value);
}
//-----------------------------------------------------------------------
/**
* Gets the value as a Double instance.
*
@ -103,7 +102,6 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>,
this.value = value.doubleValue();
}
//-----------------------------------------------------------------------
/**
* Checks whether the double value is the special NaN value.
*
@ -122,7 +120,6 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>,
return Double.isInfinite(value);
}
//-----------------------------------------------------------------------
/**
* Increments the value.
*
@ -191,7 +188,6 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>,
return value;
}
//-----------------------------------------------------------------------
/**
* Adds a value to the value of this instance.
*
@ -290,7 +286,6 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>,
return last;
}
//-----------------------------------------------------------------------
// shortValue and byteValue rely on Number implementation
/**
* Returns the value of this MutableDouble as an int.
@ -332,7 +327,6 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>,
return value;
}
//-----------------------------------------------------------------------
/**
* Gets this mutable as an instance of Double.
*
@ -342,7 +336,6 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>,
return Double.valueOf(doubleValue());
}
//-----------------------------------------------------------------------
/**
* Compares this object against the specified object. The result is {@code true} if and only if the argument
* is not {@code null} and is a {@code Double} object that represents a double that has the identical
@ -389,7 +382,6 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>,
return (int) (bits ^ bits >>> 32);
}
//-----------------------------------------------------------------------
/**
* Compares this mutable to another in ascending order.
*
@ -401,7 +393,6 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>,
return Double.compare(this.value, other.value);
}
//-----------------------------------------------------------------------
/**
* Returns the String value of this mutable.
*

View File

@ -72,7 +72,6 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu
this.value = Float.parseFloat(value);
}
//-----------------------------------------------------------------------
/**
* Gets the value as a Float instance.
*
@ -103,7 +102,6 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu
this.value = value.floatValue();
}
//-----------------------------------------------------------------------
/**
* Checks whether the float value is the special NaN value.
*
@ -122,7 +120,6 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu
return Float.isInfinite(value);
}
//-----------------------------------------------------------------------
/**
* Increments the value.
*
@ -191,7 +188,6 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu
return value;
}
//-----------------------------------------------------------------------
/**
* Adds a value to the value of this instance.
*
@ -290,7 +286,6 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu
return last;
}
//-----------------------------------------------------------------------
// shortValue and byteValue rely on Number implementation
/**
* Returns the value of this MutableFloat as an int.
@ -332,7 +327,6 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu
return value;
}
//-----------------------------------------------------------------------
/**
* Gets this mutable as an instance of Float.
*
@ -342,7 +336,6 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu
return Float.valueOf(floatValue());
}
//-----------------------------------------------------------------------
/**
* Compares this object against some other object. The result is {@code true} if and only if the argument is
* not {@code null} and is a {@code Float} object that represents a {@code float} that has the
@ -390,7 +383,6 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu
return Float.floatToIntBits(value);
}
//-----------------------------------------------------------------------
/**
* Compares this mutable to another in ascending order.
*
@ -402,7 +394,6 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu
return Float.compare(this.value, other.value);
}
//-----------------------------------------------------------------------
/**
* Returns the String value of this mutable.
*

View File

@ -74,7 +74,6 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl
this.value = Integer.parseInt(value);
}
//-----------------------------------------------------------------------
/**
* Gets the value as a Integer instance.
*
@ -105,7 +104,6 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl
this.value = value.intValue();
}
//-----------------------------------------------------------------------
/**
* Increments the value.
*
@ -174,7 +172,6 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl
return value;
}
//-----------------------------------------------------------------------
/**
* Adds a value to the value of this instance.
*
@ -273,7 +270,6 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl
return last;
}
//-----------------------------------------------------------------------
// shortValue and byteValue rely on Number implementation
/**
* Returns the value of this MutableInt as an int.
@ -315,7 +311,6 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl
return value;
}
//-----------------------------------------------------------------------
/**
* Gets this mutable as an instance of Integer.
*
@ -325,7 +320,6 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl
return Integer.valueOf(intValue());
}
//-----------------------------------------------------------------------
/**
* Compares this object to the specified object. The result is {@code true} if and only if the argument is
* not {@code null} and is a {@code MutableInt} object that contains the same {@code int} value
@ -352,7 +346,6 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl
return value;
}
//-----------------------------------------------------------------------
/**
* Compares this mutable to another in ascending order.
*
@ -364,7 +357,6 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl
return NumberUtils.compare(this.value, other.value);
}
//-----------------------------------------------------------------------
/**
* Returns the String value of this mutable.
*

View File

@ -74,7 +74,6 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta
this.value = Long.parseLong(value);
}
//-----------------------------------------------------------------------
/**
* Gets the value as a Long instance.
*
@ -105,7 +104,6 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta
this.value = value.longValue();
}
//-----------------------------------------------------------------------
/**
* Increments the value.
*
@ -174,7 +172,6 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta
return value;
}
//-----------------------------------------------------------------------
/**
* Adds a value to the value of this instance.
*
@ -273,7 +270,6 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta
return last;
}
//-----------------------------------------------------------------------
// shortValue and byteValue rely on Number implementation
/**
* Returns the value of this MutableLong as an int.
@ -315,7 +311,6 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta
return value;
}
//-----------------------------------------------------------------------
/**
* Gets this mutable as an instance of Long.
*
@ -325,7 +320,6 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta
return Long.valueOf(longValue());
}
//-----------------------------------------------------------------------
/**
* Compares this object to the specified object. The result is {@code true} if and only if the argument
* is not {@code null} and is a {@code MutableLong} object that contains the same {@code long}
@ -352,7 +346,6 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta
return (int) (value ^ (value >>> 32));
}
//-----------------------------------------------------------------------
/**
* Compares this mutable to another in ascending order.
*
@ -364,7 +357,6 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta
return NumberUtils.compare(this.value, other.value);
}
//-----------------------------------------------------------------------
/**
* Returns the String value of this mutable.
*

View File

@ -52,7 +52,6 @@ public class MutableObject<T> implements Mutable<T>, Serializable {
this.value = value;
}
//-----------------------------------------------------------------------
/**
* Gets the value.
*
@ -73,7 +72,6 @@ public class MutableObject<T> implements Mutable<T>, Serializable {
this.value = value;
}
//-----------------------------------------------------------------------
/**
* <p>
* Compares this object against the specified object. The result is {@code true} if and only if the argument
@ -111,7 +109,6 @@ public class MutableObject<T> implements Mutable<T>, Serializable {
return value == null ? 0 : value.hashCode();
}
//-----------------------------------------------------------------------
/**
* Returns the String value of this mutable.
*

View File

@ -74,7 +74,6 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu
this.value = Short.parseShort(value);
}
//-----------------------------------------------------------------------
/**
* Gets the value as a Short instance.
*
@ -105,7 +104,6 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu
this.value = value.shortValue();
}
//-----------------------------------------------------------------------
/**
* Increments the value.
*
@ -174,7 +172,6 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu
return value;
}
//-----------------------------------------------------------------------
/**
* Adds a value to the value of this instance.
*
@ -273,7 +270,6 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu
return last;
}
//-----------------------------------------------------------------------
// byteValue relies on Number implementation
/**
* Returns the value of this MutableShort as a short.
@ -325,7 +321,6 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu
return value;
}
//-----------------------------------------------------------------------
/**
* Gets this mutable as an instance of Short.
*
@ -335,7 +330,6 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu
return Short.valueOf(shortValue());
}
//-----------------------------------------------------------------------
/**
* Compares this object to the specified object. The result is {@code true} if and only if the argument
* is not {@code null} and is a {@code MutableShort} object that contains the same {@code short}
@ -362,7 +356,6 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu
return value;
}
//-----------------------------------------------------------------------
/**
* Compares this mutable to another in ascending order.
*
@ -374,7 +367,6 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu
return NumberUtils.compare(this.value, other.value);
}
//-----------------------------------------------------------------------
/**
* Returns the String value of this mutable.
*

View File

@ -181,7 +181,6 @@ public class ConstructorUtils {
return ctor.newInstance(args);
}
//-----------------------------------------------------------------------
/**
* <p>Finds a constructor given a class and signature, checking accessibility.</p>
*

View File

@ -56,7 +56,6 @@ public class FormattableUtils {
public FormattableUtils() {
}
//-----------------------------------------------------------------------
/**
* Gets the default formatted representation of the specified
* {@code Formattable}.

View File

@ -101,7 +101,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
/** The null text. */
private String nullText;
//-----------------------------------------------------------------------
/**
* Constructor that creates an empty builder initial capacity 32 characters.
*/
@ -136,7 +135,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
}
}
//-----------------------------------------------------------------------
/**
* Gets the text to be appended when a new line is added.
*
@ -157,7 +155,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return this;
}
//-----------------------------------------------------------------------
/**
* Gets the text to be appended when null is added.
*
@ -181,7 +178,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return this;
}
//-----------------------------------------------------------------------
/**
* Gets the length of the string builder.
*
@ -218,7 +214,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return this;
}
//-----------------------------------------------------------------------
/**
* Gets the current size of the internal character array buffer.
*
@ -257,7 +252,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return this;
}
//-----------------------------------------------------------------------
/**
* Gets the length of the string builder.
* <p>
@ -311,7 +305,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return this;
}
//-----------------------------------------------------------------------
/**
* Gets the character at the specified index.
*
@ -364,7 +357,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return this;
}
//-----------------------------------------------------------------------
/**
* Copies the builder's character array into a new character array.
*
@ -438,7 +430,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
System.arraycopy(buffer, startIndex, destination, destinationIndex, endIndex - startIndex);
}
//-----------------------------------------------------------------------
/**
* If possible, reads chars from the provided {@link Readable} directly into underlying
* character buffer without making extra copies.
@ -480,7 +471,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return size - oldSize;
}
//-----------------------------------------------------------------------
/**
* Appends the new line string to this string builder.
* <p>
@ -969,7 +959,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return append(String.valueOf(value));
}
//-----------------------------------------------------------------------
/**
* Appends an object followed by a new line to this string builder.
* Appending null will call {@link #appendNull()}.
@ -1191,7 +1180,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return append(value).appendNewLine();
}
//-----------------------------------------------------------------------
/**
* Appends each item in an array to the builder without any separators.
* Appending a null array will have no effect.
@ -1253,7 +1241,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return this;
}
//-----------------------------------------------------------------------
/**
* Appends an array placing separators between each value, but
* not before the first or after the last.
@ -1323,7 +1310,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return this;
}
//-----------------------------------------------------------------------
/**
* Appends a separator if the builder is currently non-empty.
* Appending a null separator will have no effect.
@ -1485,7 +1471,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return this;
}
//-----------------------------------------------------------------------
/**
* Appends the pad character to the builder the specified number of times.
*
@ -1503,7 +1488,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return this;
}
//-----------------------------------------------------------------------
/**
* Appends an object to the builder padding on the left to a fixed width.
* The {@code toString} of the object is used.
@ -1598,7 +1582,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return appendFixedWidthPadRight(String.valueOf(value), width, padChar);
}
//-----------------------------------------------------------------------
/**
* Inserts the string representation of an object into this builder.
* Inserting null will use the stored null text value.
@ -1793,7 +1776,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return insert(index, String.valueOf(value));
}
//-----------------------------------------------------------------------
/**
* Internal method to delete a range without validation.
*
@ -1825,7 +1807,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return this;
}
//-----------------------------------------------------------------------
/**
* Deletes the character wherever it occurs in the builder.
*
@ -1865,7 +1846,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return this;
}
//-----------------------------------------------------------------------
/**
* Deletes the string wherever it occurs in the builder.
*
@ -1901,7 +1881,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return this;
}
//-----------------------------------------------------------------------
/**
* Deletes all parts of the builder that the matcher matches.
* <p>
@ -1930,7 +1909,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return replace(matcher, null, 0, size, 1);
}
//-----------------------------------------------------------------------
/**
* Internal method to delete a range without validation.
*
@ -1971,7 +1949,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return this;
}
//-----------------------------------------------------------------------
/**
* Replaces the search character with the replace character
* throughout the builder.
@ -2011,7 +1988,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return this;
}
//-----------------------------------------------------------------------
/**
* Replaces the search string with the replace string throughout the builder.
*
@ -2051,7 +2027,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return this;
}
//-----------------------------------------------------------------------
/**
* Replaces all matches within the builder with the replace string.
* <p>
@ -2143,7 +2118,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return this;
}
//-----------------------------------------------------------------------
/**
* Reverses the string builder placing each character in the opposite index.
*
@ -2164,7 +2138,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return this;
}
//-----------------------------------------------------------------------
/**
* Trims the builder by removing characters less than or equal to a space
* from the beginning and end.
@ -2193,7 +2166,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return this;
}
//-----------------------------------------------------------------------
/**
* Checks whether this builder starts with the specified string.
* <p>
@ -2249,7 +2221,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return true;
}
//-----------------------------------------------------------------------
/**
* {@inheritDoc}
* @since 3.0
@ -2370,7 +2341,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return new String(buffer, index, length);
}
//-----------------------------------------------------------------------
/**
* Checks if the string builder contains the specified char.
*
@ -2412,7 +2382,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return indexOf(matcher, 0) >= 0;
}
//-----------------------------------------------------------------------
/**
* Searches the string builder to find the first reference to the specified char.
*
@ -2536,7 +2505,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return -1;
}
//-----------------------------------------------------------------------
/**
* Searches the string builder to find the last reference to the specified char.
*
@ -2657,7 +2625,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return -1;
}
//-----------------------------------------------------------------------
/**
* Creates a tokenizer that can tokenize the contents of this builder.
* <p>
@ -2694,7 +2661,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return new StrBuilderTokenizer();
}
//-----------------------------------------------------------------------
/**
* Gets the contents of this builder as a Reader.
* <p>
@ -2718,7 +2684,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return new StrBuilderReader();
}
//-----------------------------------------------------------------------
/**
* Gets this builder as a Writer that can be written to.
* <p>
@ -2849,7 +2814,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return hash;
}
//-----------------------------------------------------------------------
/**
* Gets a String version of the string builder, creating a new instance
* each time the method is called.
@ -2896,7 +2860,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
return toString();
}
//-----------------------------------------------------------------------
/**
* Validates parameters defining a range of the builder.
*
@ -2931,7 +2894,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
}
}
//-----------------------------------------------------------------------
/**
* Inner class to allow StrBuilder to operate as a tokenizer.
*/
@ -2963,7 +2925,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
}
}
//-----------------------------------------------------------------------
/**
* Inner class to allow StrBuilder to operate as a reader.
*/
@ -3053,7 +3014,6 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
}
}
//-----------------------------------------------------------------------
/**
* Inner class to allow StrBuilder to operate as a writer.
*/

View File

@ -50,7 +50,6 @@ public abstract class StrLookup<V> {
*/
private static final StrLookup<String> SYSTEM_PROPERTIES_LOOKUP = new SystemPropertiesStrLookup();
//-----------------------------------------------------------------------
/**
* Returns a lookup which always returns null.
*
@ -89,7 +88,6 @@ public abstract class StrLookup<V> {
return new MapStrLookup<>(map);
}
//-----------------------------------------------------------------------
/**
* Constructor.
*/
@ -121,7 +119,6 @@ public abstract class StrLookup<V> {
*/
public abstract String lookup(String key);
//-----------------------------------------------------------------------
/**
* Lookup implementation that uses a Map.
*/
@ -161,7 +158,6 @@ public abstract class StrLookup<V> {
}
}
//-----------------------------------------------------------------------
/**
* Lookup implementation based on system properties.
*/

View File

@ -213,7 +213,6 @@ public abstract class StrMatcher {
return new StringMatcher(str);
}
//-----------------------------------------------------------------------
/**
* Constructor.
*/
@ -271,7 +270,6 @@ public abstract class StrMatcher {
return isMatch(buffer, pos, 0, buffer.length);
}
//-----------------------------------------------------------------------
/**
* Class used to define a set of characters for matching purposes.
*/
@ -303,7 +301,6 @@ public abstract class StrMatcher {
}
}
//-----------------------------------------------------------------------
/**
* Class used to define a character for matching purposes.
*/
@ -335,7 +332,6 @@ public abstract class StrMatcher {
}
}
//-----------------------------------------------------------------------
/**
* Class used to define a set of characters for matching purposes.
*/
@ -382,7 +378,6 @@ public abstract class StrMatcher {
}
//-----------------------------------------------------------------------
/**
* Class used to match no characters.
*/
@ -409,7 +404,6 @@ public abstract class StrMatcher {
}
}
//-----------------------------------------------------------------------
/**
* Class used to match whitespace as per trim().
*/

View File

@ -175,7 +175,6 @@ public class StrSubstitutor {
*/
private boolean preserveEscapes;
//-----------------------------------------------------------------------
/**
* Replaces all the occurrences of variables in the given source object with
* their matching values from the map.
@ -239,7 +238,6 @@ public class StrSubstitutor {
return new StrSubstitutor(StrLookup.systemPropertiesLookup()).replace(source);
}
//-----------------------------------------------------------------------
/**
* Creates a new instance with defaults for variable prefix and suffix
* and the escaping character.
@ -387,7 +385,6 @@ public class StrSubstitutor {
this.setValueDelimiterMatcher(valueDelimiterMatcher);
}
//-----------------------------------------------------------------------
/**
* Replaces all the occurrences of variables with their matching values
* from the resolver using the given source string as a template.
@ -429,7 +426,6 @@ public class StrSubstitutor {
return buf.toString();
}
//-----------------------------------------------------------------------
/**
* Replaces all the occurrences of variables with their matching values
* from the resolver using the given source array as a template.
@ -469,7 +465,6 @@ public class StrSubstitutor {
return buf.toString();
}
//-----------------------------------------------------------------------
/**
* Replaces all the occurrences of variables with their matching values
* from the resolver using the given source buffer as a template.
@ -548,7 +543,6 @@ public class StrSubstitutor {
return buf.toString();
}
//-----------------------------------------------------------------------
/**
* Replaces all the occurrences of variables with their matching values
* from the resolver using the given source builder as a template.
@ -588,7 +582,6 @@ public class StrSubstitutor {
return buf.toString();
}
//-----------------------------------------------------------------------
/**
* Replaces all the occurrences of variables in the given source object with
* their matching values from the resolver. The input source object is
@ -606,7 +599,6 @@ public class StrSubstitutor {
return buf.toString();
}
//-----------------------------------------------------------------------
/**
* Replaces all the occurrences of variables within the given source buffer
* with their matching values from the resolver.
@ -647,7 +639,6 @@ public class StrSubstitutor {
return true;
}
//-----------------------------------------------------------------------
/**
* Replaces all the occurrences of variables within the given source buffer
* with their matching values from the resolver.
@ -690,7 +681,6 @@ public class StrSubstitutor {
return true;
}
//-----------------------------------------------------------------------
/**
* Replaces all the occurrences of variables within the given source
* builder with their matching values from the resolver.
@ -724,7 +714,6 @@ public class StrSubstitutor {
return substitute(source, offset, length);
}
//-----------------------------------------------------------------------
/**
* Internal method that substitutes the variables.
* <p>
@ -933,7 +922,6 @@ public class StrSubstitutor {
}
// Escape
//-----------------------------------------------------------------------
/**
* Returns the escape character.
*
@ -955,7 +943,6 @@ public class StrSubstitutor {
}
// Prefix
//-----------------------------------------------------------------------
/**
* Gets the variable prefix matcher currently in use.
* <p>
@ -1020,7 +1007,6 @@ public class StrSubstitutor {
}
// Suffix
//-----------------------------------------------------------------------
/**
* Gets the variable suffix matcher currently in use.
* <p>
@ -1085,7 +1071,6 @@ public class StrSubstitutor {
}
// Variable Default Value Delimiter
//-----------------------------------------------------------------------
/**
* Gets the variable default value delimiter matcher currently in use.
* <p>
@ -1159,7 +1144,6 @@ public class StrSubstitutor {
}
// Resolver
//-----------------------------------------------------------------------
/**
* Gets the VariableResolver that is used to lookup variables.
*
@ -1179,7 +1163,6 @@ public class StrSubstitutor {
}
// Substitution support in variable names
//-----------------------------------------------------------------------
/**
* Returns a flag whether substitution is done in variable names.
*

View File

@ -130,7 +130,6 @@ public class StrTokenizer implements ListIterator<String>, Cloneable {
/** Whether to ignore empty tokens */
private boolean ignoreEmptyTokens = true;
//-----------------------------------------------------------------------
/**
* Returns a clone of {@code CSV_TOKENIZER_PROTOTYPE}.
@ -232,7 +231,6 @@ public class StrTokenizer implements ListIterator<String>, Cloneable {
return tok;
}
//-----------------------------------------------------------------------
/**
* Constructs a tokenizer splitting on space, tab, newline and formfeed
* as per StringTokenizer, but with no text to tokenize.
@ -386,7 +384,6 @@ public class StrTokenizer implements ListIterator<String>, Cloneable {
}
// API
//-----------------------------------------------------------------------
/**
* Gets the number of tokens found in the String.
*
@ -491,7 +488,6 @@ public class StrTokenizer implements ListIterator<String>, Cloneable {
}
// ListIterator
//-----------------------------------------------------------------------
/**
* Checks whether there are any more tokens.
*
@ -592,7 +588,6 @@ public class StrTokenizer implements ListIterator<String>, Cloneable {
}
// Implementation
//-----------------------------------------------------------------------
/**
* Checks if tokenization has been done, and if not then do it.
*/
@ -835,7 +830,6 @@ public class StrTokenizer implements ListIterator<String>, Cloneable {
}
// Delimiter
//-----------------------------------------------------------------------
/**
* Gets the field delimiter matcher.
*
@ -883,7 +877,6 @@ public class StrTokenizer implements ListIterator<String>, Cloneable {
}
// Quote
//-----------------------------------------------------------------------
/**
* Gets the quote matcher currently in use.
* <p>
@ -927,7 +920,6 @@ public class StrTokenizer implements ListIterator<String>, Cloneable {
}
// Ignored
//-----------------------------------------------------------------------
/**
* Gets the ignored character matcher.
* <p>
@ -971,7 +963,6 @@ public class StrTokenizer implements ListIterator<String>, Cloneable {
}
// Trimmer
//-----------------------------------------------------------------------
/**
* Gets the trimmer character matcher.
* <p>
@ -1001,7 +992,6 @@ public class StrTokenizer implements ListIterator<String>, Cloneable {
return this;
}
//-----------------------------------------------------------------------
/**
* Gets whether the tokenizer currently returns empty tokens as null.
* The default for this property is false.
@ -1024,7 +1014,6 @@ public class StrTokenizer implements ListIterator<String>, Cloneable {
return this;
}
//-----------------------------------------------------------------------
/**
* Gets whether the tokenizer currently ignores empty tokens.
* The default for this property is true.
@ -1047,7 +1036,6 @@ public class StrTokenizer implements ListIterator<String>, Cloneable {
return this;
}
//-----------------------------------------------------------------------
/**
* Gets the String content that the tokenizer is parsing.
*
@ -1060,7 +1048,6 @@ public class StrTokenizer implements ListIterator<String>, Cloneable {
return new String(chars);
}
//-----------------------------------------------------------------------
/**
* Creates a new instance of this Tokenizer. The new instance is reset so
* that it will be at the start of the token list.
@ -1094,7 +1081,6 @@ public class StrTokenizer implements ListIterator<String>, Cloneable {
return cloned;
}
//-----------------------------------------------------------------------
/**
* Gets the String content that the tokenizer is parsing.
*

View File

@ -346,7 +346,6 @@ public class WordUtils {
}
// Capitalizing
//-----------------------------------------------------------------------
/**
* <p>Capitalizes all the whitespace separated words in a String.
* Only the first character of each word is changed. To convert the
@ -421,7 +420,6 @@ public class WordUtils {
return new String(buffer);
}
//-----------------------------------------------------------------------
/**
* <p>Converts all the whitespace separated words in a String into capitalized words,
* that is each word is made up of a titlecase character and then a series of
@ -480,7 +478,6 @@ public class WordUtils {
return capitalize(str, delimiters);
}
//-----------------------------------------------------------------------
/**
* <p>Uncapitalizes all the whitespace separated words in a String.
* Only the first character of each word is changed.</p>
@ -546,7 +543,6 @@ public class WordUtils {
return new String(buffer);
}
//-----------------------------------------------------------------------
/**
* <p>Swaps the case of a String using a word based algorithm.</p>
*
@ -596,7 +592,6 @@ public class WordUtils {
return new String(buffer);
}
//-----------------------------------------------------------------------
/**
* <p>Extracts the initial characters from each word in the String.</p>
*
@ -674,7 +669,6 @@ public class WordUtils {
return new String(buf, 0, count);
}
//-----------------------------------------------------------------------
/**
* <p>Checks if the String contains all words in the given array.</p>
*
@ -714,7 +708,6 @@ public class WordUtils {
return true;
}
//-----------------------------------------------------------------------
/**
* Is the character a delimiter.
*

View File

@ -193,7 +193,6 @@ public class DateFormatUtils {
public static final FastDateFormat SMTP_DATETIME_FORMAT
= FastDateFormat.getInstance("EEE, dd MMM yyyy HH:mm:ss Z", Locale.US);
//-----------------------------------------------------------------------
/**
* <p>DateFormatUtils instances should NOT be constructed in standard programming.</p>
*

View File

@ -76,7 +76,6 @@ public interface DateParser {
boolean parse(String source, ParsePosition pos, Calendar calendar);
// Accessors
//-----------------------------------------------------------------------
/**
* <p>Gets the pattern used by this parser.</p>
*

View File

@ -140,7 +140,6 @@ public interface DatePrinter {
// Accessors
//-----------------------------------------------------------------------
/**
* <p>Gets the pattern used by this printer.</p>
*

View File

@ -149,7 +149,6 @@ public class DateUtils {
public DateUtils() {
}
//-----------------------------------------------------------------------
/**
* <p>Checks if two date objects are on the same day ignoring time.</p>
*
@ -196,7 +195,6 @@ public class DateUtils {
cal1.get(Calendar.DAY_OF_YEAR) == cal2.get(Calendar.DAY_OF_YEAR);
}
//-----------------------------------------------------------------------
/**
* <p>Checks if two date objects represent the same instant in time.</p>
*
@ -233,7 +231,6 @@ public class DateUtils {
return cal1.getTime().getTime() == cal2.getTime().getTime();
}
//-----------------------------------------------------------------------
/**
* <p>Checks if two calendar objects represent the same local time.</p>
*
@ -260,7 +257,6 @@ public class DateUtils {
cal1.getClass() == cal2.getClass();
}
//-----------------------------------------------------------------------
/**
* <p>Parses a string representing a date by trying a variety of different parsers.</p>
*
@ -279,7 +275,6 @@ public class DateUtils {
return parseDate(str, null, parsePatterns);
}
//-----------------------------------------------------------------------
/**
* <p>Parses a string representing a date by trying a variety of different parsers,
* using the default date format symbols for the given locale.</p>
@ -302,7 +297,6 @@ public class DateUtils {
return parseDateWithLeniency(str, locale, parsePatterns, true);
}
//-----------------------------------------------------------------------
/**
* <p>Parses a string representing a date by trying a variety of different parsers.</p>
*
@ -388,7 +382,6 @@ public class DateUtils {
throw new ParseException("Unable to parse the date: " + str, -1);
}
//-----------------------------------------------------------------------
/**
* Adds a number of years to a date returning a new object.
* The original {@code Date} is unchanged.
@ -402,7 +395,6 @@ public class DateUtils {
return add(date, Calendar.YEAR, amount);
}
//-----------------------------------------------------------------------
/**
* Adds a number of months to a date returning a new object.
* The original {@code Date} is unchanged.
@ -416,7 +408,6 @@ public class DateUtils {
return add(date, Calendar.MONTH, amount);
}
//-----------------------------------------------------------------------
/**
* Adds a number of weeks to a date returning a new object.
* The original {@code Date} is unchanged.
@ -430,7 +421,6 @@ public class DateUtils {
return add(date, Calendar.WEEK_OF_YEAR, amount);
}
//-----------------------------------------------------------------------
/**
* Adds a number of days to a date returning a new object.
* The original {@code Date} is unchanged.
@ -444,7 +434,6 @@ public class DateUtils {
return add(date, Calendar.DAY_OF_MONTH, amount);
}
//-----------------------------------------------------------------------
/**
* Adds a number of hours to a date returning a new object.
* The original {@code Date} is unchanged.
@ -458,7 +447,6 @@ public class DateUtils {
return add(date, Calendar.HOUR_OF_DAY, amount);
}
//-----------------------------------------------------------------------
/**
* Adds a number of minutes to a date returning a new object.
* The original {@code Date} is unchanged.
@ -472,7 +460,6 @@ public class DateUtils {
return add(date, Calendar.MINUTE, amount);
}
//-----------------------------------------------------------------------
/**
* Adds a number of seconds to a date returning a new object.
* The original {@code Date} is unchanged.
@ -486,7 +473,6 @@ public class DateUtils {
return add(date, Calendar.SECOND, amount);
}
//-----------------------------------------------------------------------
/**
* Adds a number of milliseconds to a date returning a new object.
* The original {@code Date} is unchanged.
@ -500,7 +486,6 @@ public class DateUtils {
return add(date, Calendar.MILLISECOND, amount);
}
//-----------------------------------------------------------------------
/**
* Adds to a date returning a new object.
* The original {@code Date} is unchanged.
@ -519,7 +504,6 @@ public class DateUtils {
return c.getTime();
}
//-----------------------------------------------------------------------
/**
* Sets the years field to a date returning a new object.
* The original {@code Date} is unchanged.
@ -534,7 +518,6 @@ public class DateUtils {
return set(date, Calendar.YEAR, amount);
}
//-----------------------------------------------------------------------
/**
* Sets the months field to a date returning a new object.
* The original {@code Date} is unchanged.
@ -549,7 +532,6 @@ public class DateUtils {
return set(date, Calendar.MONTH, amount);
}
//-----------------------------------------------------------------------
/**
* Sets the day of month field to a date returning a new object.
* The original {@code Date} is unchanged.
@ -564,7 +546,6 @@ public class DateUtils {
return set(date, Calendar.DAY_OF_MONTH, amount);
}
//-----------------------------------------------------------------------
/**
* Sets the hours field to a date returning a new object. Hours range
* from 0-23.
@ -580,7 +561,6 @@ public class DateUtils {
return set(date, Calendar.HOUR_OF_DAY, amount);
}
//-----------------------------------------------------------------------
/**
* Sets the minute field to a date returning a new object.
* The original {@code Date} is unchanged.
@ -595,7 +575,6 @@ public class DateUtils {
return set(date, Calendar.MINUTE, amount);
}
//-----------------------------------------------------------------------
/**
* Sets the seconds field to a date returning a new object.
* The original {@code Date} is unchanged.
@ -610,7 +589,6 @@ public class DateUtils {
return set(date, Calendar.SECOND, amount);
}
//-----------------------------------------------------------------------
/**
* Sets the milliseconds field to a date returning a new object.
* The original {@code Date} is unchanged.
@ -625,7 +603,6 @@ public class DateUtils {
return set(date, Calendar.MILLISECOND, amount);
}
//-----------------------------------------------------------------------
/**
* Sets the specified field to a date returning a new object.
* This does not use a lenient calendar.
@ -648,7 +625,6 @@ public class DateUtils {
return c.getTime();
}
//-----------------------------------------------------------------------
/**
* Converts a {@code Date} into a {@code Calendar}.
*
@ -663,7 +639,6 @@ public class DateUtils {
return c;
}
//-----------------------------------------------------------------------
/**
* Converts a {@code Date} of a given {@code TimeZone} into a {@code Calendar}
* @param date the date to convert to a Calendar
@ -677,7 +652,6 @@ public class DateUtils {
return c;
}
//-----------------------------------------------------------------------
/**
* <p>Rounds a date, leaving the field specified as the most
* significant field.</p>
@ -793,7 +767,6 @@ public class DateUtils {
throw new ClassCastException("Could not round " + date);
}
//-----------------------------------------------------------------------
/**
* <p>Truncates a date, leaving the field specified as the most
* significant field.</p>
@ -870,7 +843,6 @@ public class DateUtils {
throw new ClassCastException("Could not truncate " + date);
}
//-----------------------------------------------------------------------
/**
* <p>Gets a date ceiling, leaving the field specified as the most
* significant field.</p>
@ -950,7 +922,6 @@ public class DateUtils {
throw new ClassCastException("Could not find ceiling of for type: " + date.getClass());
}
//-----------------------------------------------------------------------
/**
* <p>Internal calculation method.</p>
*
@ -1099,7 +1070,6 @@ public class DateUtils {
}
//-----------------------------------------------------------------------
/**
* <p>Constructs an {@code Iterator} over each day in a date
* range defined by a focus date and range style.</p>
@ -1789,7 +1759,6 @@ public class DateUtils {
Validate.notNull(date, "date");
}
//-----------------------------------------------------------------------
/**
* <p>Date iterator.</p>
*/

View File

@ -68,7 +68,6 @@ public class DurationFormatUtils {
*/
public static final String ISO_EXTENDED_FORMAT_PATTERN = "'P'yyyy'Y'M'M'd'DT'H'H'm'M's.SSS'S'";
//-----------------------------------------------------------------------
/**
* <p>Formats the time gap as a string.</p>
*
@ -222,7 +221,6 @@ public class DurationFormatUtils {
return duration.trim();
}
//-----------------------------------------------------------------------
/**
* <p>Formats the time gap as a string.</p>
*
@ -407,7 +405,6 @@ public class DurationFormatUtils {
return format(tokens, years, months, days, hours, minutes, seconds, milliseconds, padWithZeros);
}
//-----------------------------------------------------------------------
/**
* <p>The internal method to do the formatting.</p>
*

View File

@ -109,7 +109,6 @@ public class FastDateFormat extends Format implements DateParser, DatePrinter {
private final FastDatePrinter printer;
private final FastDateParser parser;
//-----------------------------------------------------------------------
/**
* <p>Gets a formatter instance using the default pattern in the
* default locale.</p>
@ -179,7 +178,6 @@ public class FastDateFormat extends Format implements DateParser, DatePrinter {
return cache.getInstance(pattern, timeZone, locale);
}
//-----------------------------------------------------------------------
/**
* <p>Gets a date formatter instance using the specified style in the
* default time zone and locale.</p>
@ -241,7 +239,6 @@ public class FastDateFormat extends Format implements DateParser, DatePrinter {
return cache.getDateInstance(style, timeZone, locale);
}
//-----------------------------------------------------------------------
/**
* <p>Gets a time formatter instance using the specified style in the
* default time zone and locale.</p>
@ -303,7 +300,6 @@ public class FastDateFormat extends Format implements DateParser, DatePrinter {
return cache.getTimeInstance(style, timeZone, locale);
}
//-----------------------------------------------------------------------
/**
* <p>Gets a date/time formatter instance using the specified style
* in the default time zone and locale.</p>
@ -370,7 +366,6 @@ public class FastDateFormat extends Format implements DateParser, DatePrinter {
}
// Constructor
//-----------------------------------------------------------------------
/**
* <p>Constructs a new FastDateFormat.</p>
*
@ -384,7 +379,6 @@ public class FastDateFormat extends Format implements DateParser, DatePrinter {
}
// Constructor
//-----------------------------------------------------------------------
/**
* <p>Constructs a new FastDateFormat.</p>
*
@ -400,7 +394,6 @@ public class FastDateFormat extends Format implements DateParser, DatePrinter {
}
// Format methods
//-----------------------------------------------------------------------
/**
* <p>Formats a {@code Date}, {@code Calendar} or
* {@code Long} (milliseconds) object.</p>
@ -539,7 +532,6 @@ public class FastDateFormat extends Format implements DateParser, DatePrinter {
}
// Parsing
//-----------------------------------------------------------------------
/* (non-Javadoc)
@ -576,7 +568,6 @@ public class FastDateFormat extends Format implements DateParser, DatePrinter {
}
// Accessors
//-----------------------------------------------------------------------
/**
* <p>Gets the pattern used by this formatter.</p>
*
@ -623,7 +614,6 @@ public class FastDateFormat extends Format implements DateParser, DatePrinter {
}
// Basics
//-----------------------------------------------------------------------
/**
* <p>Compares two objects for equality.</p>
*

View File

@ -169,7 +169,6 @@ public class FastDateParser implements DateParser, Serializable {
}
// helper classes to parse the format string
//-----------------------------------------------------------------------
/**
* Holds strategy and field width
@ -265,7 +264,6 @@ public class FastDateParser implements DateParser, Serializable {
}
// Accessors
//-----------------------------------------------------------------------
/* (non-Javadoc)
* @see org.apache.commons.lang3.time.DateParser#getPattern()
*/
@ -292,7 +290,6 @@ public class FastDateParser implements DateParser, Serializable {
// Basics
//-----------------------------------------------------------------------
/**
* <p>Compares another object for equality with this object.</p>
*
@ -437,7 +434,6 @@ public class FastDateParser implements DateParser, Serializable {
}
// Support for strategies
//-----------------------------------------------------------------------
private static StringBuilder simpleQuote(final StringBuilder sb, final String value) {
for (int i = 0; i < value.length(); ++i) {

View File

@ -140,7 +140,6 @@ public class FastDatePrinter implements DatePrinter, Serializable {
private transient int mMaxLengthEstimate;
// Constructor
//-----------------------------------------------------------------------
/**
* <p>Constructs a new FastDatePrinter.</p>
* Use {@link FastDateFormat#getInstance(String, TimeZone, Locale)} or another variation of the
@ -175,7 +174,6 @@ public class FastDatePrinter implements DatePrinter, Serializable {
}
// Parse the pattern
//-----------------------------------------------------------------------
/**
* <p>Returns a list of Rules given a pattern.</p>
*
@ -394,7 +392,6 @@ public class FastDatePrinter implements DatePrinter, Serializable {
}
// Format methods
//-----------------------------------------------------------------------
/**
* <p>Formats a {@code Date}, {@code Calendar} or
* {@code Long} (milliseconds) object.</p>
@ -584,7 +581,6 @@ public class FastDatePrinter implements DatePrinter, Serializable {
}
// Accessors
//-----------------------------------------------------------------------
/* (non-Javadoc)
* @see org.apache.commons.lang3.time.DatePrinter#getPattern()
*/
@ -623,7 +619,6 @@ public class FastDatePrinter implements DatePrinter, Serializable {
}
// Basics
//-----------------------------------------------------------------------
/**
* <p>Compares two objects for equality.</p>
*
@ -662,7 +657,6 @@ public class FastDatePrinter implements DatePrinter, Serializable {
}
// Serializing
//-----------------------------------------------------------------------
/**
* Create the object after serialization. This implementation reinitializes the
* transient properties.
@ -762,7 +756,6 @@ public class FastDatePrinter implements DatePrinter, Serializable {
}
// Rules
//-----------------------------------------------------------------------
/**
* <p>Inner class defining a rule.</p>
*/
@ -1303,7 +1296,6 @@ public class FastDatePrinter implements DatePrinter, Serializable {
}
}
//-----------------------------------------------------------------------
private static final ConcurrentMap<TimeZoneDisplayKey, String> cTimeZoneDisplayCache =
new ConcurrentHashMap<>(7);

View File

@ -120,7 +120,6 @@ public final class ImmutableTriple<L, M, R> extends Triple<L, M, R> {
this.right = right;
}
//-----------------------------------------------------------------------
/**
* {@inheritDoc}
*/

View File

@ -120,7 +120,6 @@ public class MutablePair<L, R> extends Pair<L, R> {
this.right = right;
}
//-----------------------------------------------------------------------
/**
* {@inheritDoc}
*/

View File

@ -101,7 +101,6 @@ public class MutableTriple<L, M, R> extends Triple<L, M, R> {
this.right = right;
}
//-----------------------------------------------------------------------
/**
* {@inheritDoc}
*/

View File

@ -120,7 +120,6 @@ public abstract class Pair<L, R> implements Map.Entry<L, R>, Comparable<Pair<L,
return ImmutablePair.of(pair);
}
//-----------------------------------------------------------------------
/**
* <p>Compares the pair based on the left element followed by the right element.
* The types must be {@code Comparable}.</p>
@ -166,7 +165,6 @@ public abstract class Pair<L, R> implements Map.Entry<L, R>, Comparable<Pair<L,
return getLeft();
}
//-----------------------------------------------------------------------
/**
* <p>Gets the left element from this pair.</p>
*

View File

@ -106,7 +106,6 @@ public abstract class Triple<L, M, R> implements Comparable<Triple<L, M, R>>, Se
return new ImmutableTriple<>(left, middle, right);
}
//-----------------------------------------------------------------------
/**
* <p>Compares the triple based on the left element, followed by the middle element,
* finally the right element.
@ -142,7 +141,6 @@ public abstract class Triple<L, M, R> implements Comparable<Triple<L, M, R>>, Se
return false;
}
//-----------------------------------------------------------------------
/**
* <p>Gets the left element from this triple.</p>
*

View File

@ -36,7 +36,6 @@ import org.junit.jupiter.api.Test;
*/
public class CharRangeTest {
//-----------------------------------------------------------------------
@Test
public void testClass() {
// class changed to non-public in 3.0
@ -44,7 +43,6 @@ public class CharRangeTest {
assertTrue(Modifier.isFinal(CharRange.class.getModifiers()));
}
//-----------------------------------------------------------------------
@Test
public void testConstructorAccessors_is() {
final CharRange rangea = CharRange.is('a');
@ -117,7 +115,6 @@ public class CharRangeTest {
assertEquals("^a-e", rangea.toString());
}
//-----------------------------------------------------------------------
@Test
public void testEquals_Object() {
final CharRange rangea = CharRange.is('a');
@ -162,7 +159,6 @@ public class CharRangeTest {
assertNotEquals(rangenotbf.hashCode(), rangeae.hashCode());
}
//-----------------------------------------------------------------------
@Test
public void testContains_Char() {
CharRange range = CharRange.is('c');
@ -192,7 +188,6 @@ public class CharRangeTest {
assertTrue(range.contains(Character.MAX_VALUE));
}
//-----------------------------------------------------------------------
@Test
public void testContains_Charrange() {
final CharRange a = CharRange.is('a');
@ -367,7 +362,6 @@ public class CharRangeTest {
assertThrows(NoSuchElementException.class, notLastIt::next);
}
//-----------------------------------------------------------------------
@Test
public void testSerialization() {
CharRange range = CharRange.is('a');
@ -378,7 +372,6 @@ public class CharRangeTest {
assertEquals(range, SerializationUtils.clone(range));
}
//-----------------------------------------------------------------------
@Test
public void testIteratorRemove() {
final CharRange a = CharRange.is('a');

View File

@ -41,7 +41,6 @@ import org.junit.jupiter.params.provider.MethodSource;
*/
public class CharSequenceUtilsTest {
//-----------------------------------------------------------------------
@Test
public void testConstructor() {
assertNotNull(new CharSequenceUtils());
@ -52,7 +51,6 @@ public class CharSequenceUtilsTest {
assertFalse(Modifier.isFinal(CharSequenceUtils.class.getModifiers()));
}
//-----------------------------------------------------------------------
@Test
public void testSubSequence() {
//

View File

@ -34,14 +34,12 @@ import org.junit.jupiter.api.Test;
*/
public class CharSetTest {
//-----------------------------------------------------------------------
@Test
public void testClass() {
assertTrue(Modifier.isPublic(CharSet.class.getModifiers()));
assertFalse(Modifier.isFinal(CharSet.class.getModifiers()));
}
//-----------------------------------------------------------------------
@Test
public void testGetInstance() {
assertSame(CharSet.EMPTY, CharSet.getInstance( (String) null));
@ -53,7 +51,6 @@ public class CharSetTest {
assertSame(CharSet.ASCII_NUMERIC, CharSet.getInstance("0-9"));
}
//-----------------------------------------------------------------------
@Test
public void testGetInstance_Stringarray() {
assertNull(CharSet.getInstance((String[]) null));
@ -62,7 +59,6 @@ public class CharSetTest {
assertEquals("[a-e]", CharSet.getInstance(new String[] {"a-e"}).toString());
}
//-----------------------------------------------------------------------
@Test
public void testConstructor_String_simple() {
CharSet set;
@ -340,7 +336,6 @@ public class CharSetTest {
assertFalse(set.contains('c'));
}
//-----------------------------------------------------------------------
@Test
public void testEquals_Object() {
final CharSet abc = CharSet.getInstance("abc");
@ -385,7 +380,6 @@ public class CharSetTest {
assertEquals(notatoc.hashCode(), notatoc2.hashCode());
}
//-----------------------------------------------------------------------
@Test
public void testContains_Char() {
final CharSet btod = CharSet.getInstance("b-d");
@ -429,7 +423,6 @@ public class CharSetTest {
assertEquals(1, array.length);
}
//-----------------------------------------------------------------------
@Test
public void testSerialization() {
CharSet set = CharSet.getInstance("a");
@ -440,7 +433,6 @@ public class CharSetTest {
assertEquals(set, SerializationUtils.clone(set));
}
//-----------------------------------------------------------------------
@Test
public void testStatics() {
CharRange[] array;

View File

@ -32,7 +32,6 @@ import org.junit.jupiter.api.Test;
*/
public class CharSetUtilsTest {
//-----------------------------------------------------------------------
@Test
public void testConstructor() {
assertNotNull(new CharSetUtils());
@ -43,7 +42,6 @@ public class CharSetUtilsTest {
assertFalse(Modifier.isFinal(CharSetUtils.class.getModifiers()));
}
//-----------------------------------------------------------------------
@Test
public void testSqueeze_StringString() {
assertNull(CharSetUtils.squeeze(null, (String) null));
@ -84,7 +82,6 @@ public class CharSetUtilsTest {
assertEquals("fof", CharSetUtils.squeeze("fooooff", "fo"));
}
//-----------------------------------------------------------------------
@Test
public void testContainsAny_StringString() {
assertFalse(CharSetUtils.containsAny(null, (String) null));
@ -124,7 +121,6 @@ public class CharSetUtilsTest {
assertFalse(CharSetUtils.containsAny("hello", ""));
}
//-----------------------------------------------------------------------
@Test
public void testCount_StringString() {
assertEquals(0, CharSetUtils.count(null, (String) null));
@ -164,7 +160,6 @@ public class CharSetUtilsTest {
assertEquals(0, CharSetUtils.count("hello", ""));
}
//-----------------------------------------------------------------------
@Test
public void testKeep_StringString() {
assertNull(CharSetUtils.keep(null, (String) null));
@ -207,7 +202,6 @@ public class CharSetUtilsTest {
assertEquals("ll", CharSetUtils.keep("hello", "l"));
}
//-----------------------------------------------------------------------
@Test
public void testDelete_StringString() {
assertNull(CharSetUtils.delete(null, (String) null));

View File

@ -59,7 +59,6 @@ public class LocaleUtilsTest {
LocaleUtils.isAvailableLocale(Locale.getDefault());
}
//-----------------------------------------------------------------------
/**
* Test that constructors are public, and work, etc.
*/
@ -73,7 +72,6 @@ public class LocaleUtilsTest {
assertFalse(Modifier.isFinal(LocaleUtils.class.getModifiers()));
}
//-----------------------------------------------------------------------
/**
* Pass in a valid language, test toLocale.
*
@ -221,7 +219,6 @@ public class LocaleUtilsTest {
IllegalArgumentException.class, () -> LocaleUtils.toLocale("uu_UU_"), "Must be 3, 5 or 7+ in length");
}
//-----------------------------------------------------------------------
/**
* Helper method for local lookups.
*
@ -239,7 +236,6 @@ public class LocaleUtilsTest {
assertUnmodifiableCollection(localeList);
}
//-----------------------------------------------------------------------
/**
* Test localeLookupList() method.
*/
@ -314,7 +310,6 @@ public class LocaleUtilsTest {
LOCALE_EN});
}
//-----------------------------------------------------------------------
/**
* Test availableLocaleList() method.
*/
@ -331,7 +326,6 @@ public class LocaleUtilsTest {
assertEquals(jdkLocaleList, list);
}
//-----------------------------------------------------------------------
/**
* Test availableLocaleSet() method.
*/
@ -349,7 +343,6 @@ public class LocaleUtilsTest {
assertEquals(jdkLocaleSet, set);
}
//-----------------------------------------------------------------------
/**
* Test availableLocaleSet() method.
*/
@ -381,7 +374,6 @@ public class LocaleUtilsTest {
}
}
//-----------------------------------------------------------------------
/**
* Make sure the language by country is correct. It checks that
* the LocaleUtils.languagesByCountry(country) call contains the
@ -428,7 +420,6 @@ public class LocaleUtilsTest {
assertLanguageByCountry("CH", new String[]{"fr", "de", "it"});
}
//-----------------------------------------------------------------------
/**
* Make sure the country by language is correct. It checks that
* the LocaleUtils.countryByLanguage(language) call contains the

View File

@ -41,7 +41,6 @@ import org.junit.jupiter.api.Test;
*/
public class RandomStringUtilsTest {
//-----------------------------------------------------------------------
@Test
public void testConstructor() {
assertNotNull(new RandomStringUtils());
@ -52,7 +51,6 @@ public class RandomStringUtilsTest {
assertFalse(Modifier.isFinal(RandomStringUtils.class.getModifiers()));
}
//-----------------------------------------------------------------------
/**
* Test the implementation
*/

View File

@ -62,7 +62,6 @@ public class SerializationUtilsTest {
iMap.put("BAR", iInteger);
}
//-----------------------------------------------------------------------
@Test
public void testConstructor() {
@ -96,7 +95,6 @@ public class SerializationUtilsTest {
assertSame(ex, serEx.getCause());
}
//-----------------------------------------------------------------------
@Test
public void testSerializeStream() throws Exception {
@ -164,7 +162,6 @@ public class SerializationUtilsTest {
assertEquals("java.io.IOException: " + SERIALIZE_IO_EXCEPTION_MESSAGE, e.getMessage());
}
//-----------------------------------------------------------------------
@Test
public void testDeserializeStream() throws Exception {
@ -243,7 +240,6 @@ public class SerializationUtilsTest {
assertEquals(iMap, newMap);
}
//-----------------------------------------------------------------------
@Test
public void testSerializeBytes() throws Exception {
@ -281,7 +277,6 @@ public class SerializationUtilsTest {
assertArrayEquals(realBytes, testBytes);
}
//-----------------------------------------------------------------------
@Test
public void testDeserializeBytes() throws Exception {
@ -325,7 +320,6 @@ public class SerializationUtilsTest {
assertThrows(SerializationException.class, () -> SerializationUtils.deserialize(new byte[0]));
}
//-----------------------------------------------------------------------
@Test
public void testClone() {

View File

@ -198,7 +198,6 @@ public class StringUtilsEqualsIndexOfTest {
assertTrue(StringUtils.equalsAnyIgnoreCase(FOO, new StringBuilder("fOo")));
}
//-----------------------------------------------------------------------
@Test
public void testCompare_StringString() {
assertEquals(0, StringUtils.compare(null, null));
@ -267,7 +266,6 @@ public class StringUtilsEqualsIndexOfTest {
assertTrue(StringUtils.compareIgnoreCase("abc", "AB ", false) > 0);
}
//-----------------------------------------------------------------------
@Test
public void testIndexOf_char() {
assertEquals(-1, StringUtils.indexOf(null, ' '));

View File

@ -33,7 +33,6 @@ public class StringUtilsStartsEndsWithTest {
private static final String BAR = "BAR";
private static final String FOOBAR = "FOOBAR";
//-----------------------------------------------------------------------
/**
* Test StringUtils.startsWith()

View File

@ -32,7 +32,6 @@ public class StringUtilsSubstringTest {
private static final String FOOBAR = "foobar";
private static final String SENTENCE = "foo bar baz";
//-----------------------------------------------------------------------
@Test
public void testSubstring_StringInt() {
@ -262,7 +261,6 @@ public class StringUtilsSubstringTest {
assertEquals("", StringUtils.substringAfterLast("", 'd'));
}
//-----------------------------------------------------------------------
@Test
public void testSubstringBetween_StringString() {
assertNull(StringUtils.substringBetween(null, "tag"));
@ -351,7 +349,6 @@ public class StringUtilsSubstringTest {
assertEquals(0, results.length);
}
//-----------------------------------------------------------------------
@Test
public void testCountMatches_String() {
assertEquals(0, StringUtils.countMatches(null, null));

View File

@ -242,7 +242,6 @@ public class StringUtilsTest {
assertEquals(str.substring(2), res[1], msg);
}
//-----------------------------------------------------------------------
//Fixed LANG-1463
@Test
public void testAbbreviateMarkerWithEmptyString() {
@ -489,7 +488,6 @@ public class StringUtilsTest {
assertEquals("'cat'", StringUtils.capitalize("'cat'"));
}
//-----------------------------------------------------------------------
@Test
public void testCenter_StringInt() {
assertNull(StringUtils.center(null, -1));
@ -607,7 +605,6 @@ public class StringUtilsTest {
}
}
//-----------------------------------------------------------------------
@Test
public void testConstructor() {
assertNotNull(new StringUtils());
@ -618,7 +615,6 @@ public class StringUtilsTest {
assertFalse(Modifier.isFinal(StringUtils.class.getModifiers()));
}
//-----------------------------------------------------------------------
@Test
public void testDefault_String() {
assertEquals("", StringUtils.defaultString(null));
@ -787,7 +783,6 @@ public class StringUtilsTest {
assertEquals("test", StringUtils.deleteWhitespace("\u000Bt \t\n\u0009e\rs\n\n \tt"));
}
//-----------------------------------------------------------------------
@Test
public void testDifference_StringString() {
assertNull(StringUtils.difference(null, null));
@ -993,7 +988,6 @@ public class StringUtilsTest {
assertThrows(IllegalArgumentException.class, () -> StringUtils.getLevenshteinDistance("a", null, 0));
}
//-----------------------------------------------------------------------
@Test
public void testGetLevenshteinDistance_StringString() {
assertEquals(0, StringUtils.getLevenshteinDistance("", ""));
@ -1370,7 +1364,6 @@ public class StringUtilsTest {
assertEquals(expected, actual);
}
//-----------------------------------------------------------------------
@Test
public void testJoin_Objects() {
assertEquals("abc", StringUtils.join("a", "b", "c"));
@ -1408,7 +1401,6 @@ public class StringUtilsTest {
assertEquals("121", StringUtils.stripEnd("121.00", ".0"));
}
//-----------------------------------------------------------------------
@Test
public void testLeftPad_StringInt() {
assertNull(StringUtils.leftPad(null, 5));
@ -2228,7 +2220,6 @@ public class StringUtilsTest {
StringUtils.replacePattern("Lorem ipsum dolor sit", "( +)([a-z]+)", "_$2"));
}
//-----------------------------------------------------------------------
@Test
public void testReverse_String() {
assertNull(StringUtils.reverse(null));
@ -2245,7 +2236,6 @@ public class StringUtilsTest {
assertEquals("", StringUtils.reverseDelimited("", '.'));
}
//-----------------------------------------------------------------------
@Test
public void testRightPad_StringInt() {
assertNull(StringUtils.rightPad(null, 5));
@ -2282,7 +2272,6 @@ public class StringUtilsTest {
assertEquals("abc ", StringUtils.rightPad("abc", 5, ""));
}
//-----------------------------------------------------------------------
@Test
public void testRotate_StringInt() {
assertNull(StringUtils.rotate(null, 1));
@ -3010,7 +2999,6 @@ public class StringUtilsTest {
assertEquals(expectedString, StringUtils.toString(expectedBytes, encoding));
}
//-----------------------------------------------------------------------
@Test
public void testTruncate_StringInt() {
assertNull(StringUtils.truncate(null, 12));

View File

@ -67,7 +67,6 @@ public class StringUtilsTrimStripTest {
assertEquals("", StringUtils.trimToEmpty(null));
}
//-----------------------------------------------------------------------
@Test
public void testStrip_String() {
assertNull(StringUtils.strip(null));

View File

@ -29,7 +29,6 @@ import org.junit.jupiter.api.Test;
*/
public class CompareToBuilderTest {
//-----------------------------------------------------------------------
static class TestObject implements Comparable<TestObject> {
private int a;

View File

@ -33,7 +33,6 @@ import org.junit.jupiter.api.Test;
*/
public class EqualsBuilderTest {
//-----------------------------------------------------------------------
static class TestObject {
private int a;

View File

@ -27,7 +27,6 @@ import org.junit.jupiter.api.Test;
*/
public class HashCodeBuilderAndEqualsBuilderTest {
//-----------------------------------------------------------------------
private void testInteger(final boolean testTransients) {
final Integer i1 = Integer.valueOf(12345);

View File

@ -48,7 +48,6 @@ public class ToStringBuilderTest {
validateNullToStringStyleRegistry();
}
//-----------------------------------------------------------------------
@Test
public void testConstructorEx1() {

View File

@ -30,7 +30,6 @@ public class ToStringStyleTest {
}
//-----------------------------------------------------------------------
@Test
public void testSetArrayStart() {
final ToStringStyle style = new ToStringStyleImpl();

View File

@ -269,7 +269,6 @@ public class ConcurrentUtilsTest {
null));
}
//-----------------------------------------------------------------------
/**
* Tests initialize() for a null argument.
*
@ -352,7 +351,6 @@ public class ConcurrentUtilsTest {
EasyMock.verify(init);
}
//-----------------------------------------------------------------------
/**
* Tests constant future.
*
@ -389,7 +387,6 @@ public class ConcurrentUtilsTest {
assertFalse(test.cancel(false));
}
//-----------------------------------------------------------------------
/**
* Tests putIfAbsent() if the map contains the key in question.
*/

View File

@ -124,7 +124,6 @@ public class ExceptionUtilsTest {
private Throwable jdkNoCause;
//-----------------------------------------------------------------------
private ExceptionWithCause cyclicCause;
@ -142,7 +141,6 @@ public class ExceptionUtilsTest {
}
}
//-----------------------------------------------------------------------
private Throwable createExceptionWithoutCause() {
try {
throw new ExceptionWithoutCause();
@ -217,7 +215,6 @@ public class ExceptionUtilsTest {
assertFalse(Modifier.isFinal(ExceptionUtils.class.getModifiers()));
}
//-----------------------------------------------------------------------
@SuppressWarnings("deprecation") // Specifically tests the deprecated methods
@Test
public void testGetCause_Throwable() {
@ -262,7 +259,6 @@ public class ExceptionUtilsTest {
assertSame(cyclicCause.getCause().getCause(), ExceptionUtils.getRootCause(cyclicCause));
}
//-----------------------------------------------------------------------
@Test
public void testGetRootCauseStackTrace_Throwable() {
assertEquals(0, ExceptionUtils.getRootCauseStackTrace(null).length);
@ -289,7 +285,6 @@ public class ExceptionUtilsTest {
assertFalse(match);
}
//-----------------------------------------------------------------------
@Test
public void testGetThrowableCount_Throwable() {
assertEquals(0, ExceptionUtils.getThrowableCount(null));
@ -315,7 +310,6 @@ public class ExceptionUtilsTest {
assertSame(withoutCause, throwables.get(1));
}
//-----------------------------------------------------------------------
@Test
public void testGetThrowableList_Throwable_null() {
final List<?> throwables = ExceptionUtils.getThrowableList(null);
@ -362,7 +356,6 @@ public class ExceptionUtilsTest {
assertSame(withoutCause, throwables[1]);
}
//-----------------------------------------------------------------------
@Test
public void testGetThrowables_Throwable_null() {
assertEquals(0, ExceptionUtils.getThrowables(null).length);
@ -446,7 +439,6 @@ public class ExceptionUtilsTest {
assertEquals(-1, ExceptionUtils.indexOfThrowable(withCause, Throwable.class, 0));
}
//-----------------------------------------------------------------------
@Test
public void testIndexOfType_ThrowableClass() {
assertEquals(-1, ExceptionUtils.indexOfType(null, null));
@ -500,7 +492,6 @@ public class ExceptionUtilsTest {
assertEquals(0, ExceptionUtils.indexOfType(withCause, Throwable.class, 0));
}
//-----------------------------------------------------------------------
@Test
public void testPrintRootCauseStackTrace_Throwable() {
ExceptionUtils.printRootCauseStackTrace(null);
@ -508,7 +499,6 @@ public class ExceptionUtilsTest {
// internally this method calls stream method anyway
}
//-----------------------------------------------------------------------
@Test
public void testPrintRootCauseStackTrace_ThrowableStream() {

View File

@ -45,7 +45,6 @@ public class StrBuilderAppendInsertTest {
}
};
//-----------------------------------------------------------------------
@Test
public void testAppendNewLine() {
StrBuilder sb = new StrBuilder("---");
@ -57,7 +56,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("---#" + SEP, sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppendWithNullText() {
final StrBuilder sb = new StrBuilder();
@ -89,7 +87,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("NULLNULLfooNULLbarNULLbaz", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppend_Object() {
final StrBuilder sb = new StrBuilder();
@ -118,7 +115,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("foobazyesSeqbld", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppend_StringBuilder() {
StrBuilder sb = new StrBuilder();
@ -136,7 +132,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("foobar", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppend_String() {
StrBuilder sb = new StrBuilder();
@ -154,7 +149,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("foobar", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppend_String_int_int() {
StrBuilder sb = new StrBuilder();
@ -206,7 +200,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("foobarard", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppend_StringBuilder_int_int() {
StrBuilder sb = new StrBuilder();
@ -258,7 +251,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("foobarard", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppend_StringBuffer() {
StrBuilder sb = new StrBuilder();
@ -276,7 +268,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("foobar", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppend_StringBuffer_int_int() {
StrBuilder sb = new StrBuilder();
@ -325,7 +316,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("foobar", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppend_StrBuilder() {
StrBuilder sb = new StrBuilder();
@ -343,7 +333,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("foobar", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppend_StrBuilder_int_int() {
StrBuilder sb = new StrBuilder();
@ -392,7 +381,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("foobar", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppend_CharArray() {
StrBuilder sb = new StrBuilder();
@ -407,7 +395,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("foo", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppend_CharArray_int_int() {
StrBuilder sb = new StrBuilder();
@ -456,7 +443,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("foobar", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppend_Boolean() {
final StrBuilder sb = new StrBuilder();
@ -470,7 +456,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("truefalse!", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppend_PrimitiveNumber() {
final StrBuilder sb = new StrBuilder();
@ -487,7 +472,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("012.34.5", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppendln_FormattedString() {
final int[] count = new int[2];
@ -511,7 +495,6 @@ public class StrBuilderAppendInsertTest {
assertEquals(1, count[1]);
}
//-----------------------------------------------------------------------
@Test
public void testAppendln_Object() {
final StrBuilder sb = new StrBuilder();
@ -525,7 +508,6 @@ public class StrBuilderAppendInsertTest {
assertEquals(SEP + "foo" + SEP + "6" + SEP, sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppendln_String() {
final int[] count = new int[2];
@ -549,7 +531,6 @@ public class StrBuilderAppendInsertTest {
assertEquals(1, count[1]);
}
//-----------------------------------------------------------------------
@Test
public void testAppendln_String_int_int() {
final int[] count = new int[2];
@ -573,7 +554,6 @@ public class StrBuilderAppendInsertTest {
assertEquals(1, count[1]);
}
//-----------------------------------------------------------------------
@Test
public void testAppendln_StringBuffer() {
final int[] count = new int[2];
@ -597,7 +577,6 @@ public class StrBuilderAppendInsertTest {
assertEquals(1, count[1]);
}
//-----------------------------------------------------------------------
@Test
public void testAppendln_StringBuilder() {
final int[] count = new int[2];
@ -621,7 +600,6 @@ public class StrBuilderAppendInsertTest {
assertEquals(1, count[1]);
}
//-----------------------------------------------------------------------
@Test
public void testAppendln_StringBuffer_int_int() {
final int[] count = new int[2];
@ -645,7 +623,6 @@ public class StrBuilderAppendInsertTest {
assertEquals(1, count[1]);
}
//-----------------------------------------------------------------------
@Test
public void testAppendln_StringBuilder_int_int() {
final int[] count = new int[2];
@ -669,7 +646,6 @@ public class StrBuilderAppendInsertTest {
assertEquals(1, count[1]);
}
//-----------------------------------------------------------------------
@Test
public void testAppendln_StrBuilder() {
final int[] count = new int[2];
@ -693,7 +669,6 @@ public class StrBuilderAppendInsertTest {
assertEquals(1, count[1]);
}
//-----------------------------------------------------------------------
@Test
public void testAppendln_StrBuilder_int_int() {
final int[] count = new int[2];
@ -717,7 +692,6 @@ public class StrBuilderAppendInsertTest {
assertEquals(1, count[1]);
}
//-----------------------------------------------------------------------
@Test
public void testAppendln_CharArray() {
final int[] count = new int[2];
@ -741,7 +715,6 @@ public class StrBuilderAppendInsertTest {
assertEquals(1, count[1]);
}
//-----------------------------------------------------------------------
@Test
public void testAppendln_CharArray_int_int() {
final int[] count = new int[2];
@ -765,7 +738,6 @@ public class StrBuilderAppendInsertTest {
assertEquals(1, count[1]);
}
//-----------------------------------------------------------------------
@Test
public void testAppendln_Boolean() {
final StrBuilder sb = new StrBuilder();
@ -777,7 +749,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("false" + SEP, sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppendln_PrimitiveNumber() {
final StrBuilder sb = new StrBuilder();
@ -797,7 +768,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("4.5" + SEP, sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppendPadding() {
final StrBuilder sb = new StrBuilder();
@ -819,7 +789,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("foo-----------------", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppendFixedWidthPadLeft() {
final StrBuilder sb = new StrBuilder();
@ -858,7 +827,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("-null", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppendFixedWidthPadLeft_int() {
final StrBuilder sb = new StrBuilder();
@ -892,7 +860,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("-------123", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppendFixedWidthPadRight() {
final StrBuilder sb = new StrBuilder();
@ -939,7 +906,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("f", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppendFixedWidthPadRight_int() {
final StrBuilder sb = new StrBuilder();
@ -973,7 +939,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("123-------", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppend_FormattedString() {
StrBuilder sb;
@ -998,7 +963,6 @@ public class StrBuilderAppendInsertTest {
assertEquals(expected, sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppendAll_Array() {
final StrBuilder sb = new StrBuilder();
@ -1018,7 +982,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("foobarbaz", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppendAll_Collection() {
final StrBuilder sb = new StrBuilder();
@ -1034,7 +997,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("foobarbaz", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppendAll_Iterator() {
final StrBuilder sb = new StrBuilder();
@ -1050,7 +1012,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("foobarbaz", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppendWithSeparators_Array() {
final StrBuilder sb = new StrBuilder();
@ -1074,7 +1035,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("foo,,baz", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppendWithSeparators_Collection() {
final StrBuilder sb = new StrBuilder();
@ -1098,7 +1058,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("foo,,baz", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppendWithSeparators_Iterator() {
final StrBuilder sb = new StrBuilder();
@ -1122,7 +1081,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("foo,,baz", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppendWithSeparatorsWithNullText() {
final StrBuilder sb = new StrBuilder();
@ -1135,7 +1093,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("foo,null,baz", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppendSeparator_String() {
final StrBuilder sb = new StrBuilder();
@ -1147,7 +1104,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("foo,", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppendSeparator_String_String() {
final StrBuilder sb = new StrBuilder();
@ -1170,7 +1126,6 @@ public class StrBuilderAppendInsertTest {
assertEquals(startSeparator + foo + standardSeparator, sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppendSeparator_char() {
final StrBuilder sb = new StrBuilder();
@ -1195,7 +1150,6 @@ public class StrBuilderAppendInsertTest {
assertEquals(String.valueOf(startSeparator) + foo + standardSeparator, sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppendSeparator_String_int() {
final StrBuilder sb = new StrBuilder();
@ -1210,7 +1164,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("foo,", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppendSeparator_char_int() {
final StrBuilder sb = new StrBuilder();
@ -1225,7 +1178,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("foo,", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testInsert() {
@ -1444,7 +1396,6 @@ public class StrBuilderAppendInsertTest {
assertEquals("4.5barbaz", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testInsertWithNullText() {
final StrBuilder sb = new StrBuilder();

View File

@ -44,7 +44,6 @@ import org.junit.jupiter.api.Test;
@Deprecated
public class StrBuilderTest {
//-----------------------------------------------------------------------
@Test
public void testConstructors() {
final StrBuilder sb0 = new StrBuilder();
@ -88,7 +87,6 @@ public class StrBuilderTest {
assertEquals(3, sb7.size());
}
//-----------------------------------------------------------------------
@Test
public void testChaining() {
final StrBuilder sb = new StrBuilder();
@ -103,7 +101,6 @@ public class StrBuilderTest {
assertSame(sb, sb.trim());
}
//-----------------------------------------------------------------------
@Test
public void testReadFromReader() throws Exception {
String s = "";
@ -181,7 +178,6 @@ public class StrBuilderTest {
}
}
//-----------------------------------------------------------------------
@Test
public void testGetSetNewLineText() {
final StrBuilder sb = new StrBuilder();
@ -197,7 +193,6 @@ public class StrBuilderTest {
assertNull(sb.getNewLineText());
}
//-----------------------------------------------------------------------
@Test
public void testGetSetNullText() {
final StrBuilder sb = new StrBuilder();
@ -216,7 +211,6 @@ public class StrBuilderTest {
assertNull(sb.getNullText());
}
//-----------------------------------------------------------------------
@Test
public void testCapacityAndLength() {
final StrBuilder sb = new StrBuilder();
@ -299,7 +293,6 @@ public class StrBuilderTest {
assertTrue(sb.isEmpty());
}
//-----------------------------------------------------------------------
@Test
public void testLength() {
final StrBuilder sb = new StrBuilder();
@ -326,7 +319,6 @@ public class StrBuilderTest {
"setLength(-1) expected StringIndexOutOfBoundsException");
}
//-----------------------------------------------------------------------
@Test
public void testCapacity() {
final StrBuilder sb = new StrBuilder();
@ -361,7 +353,6 @@ public class StrBuilderTest {
assertEquals(10, sb.capacity());
}
//-----------------------------------------------------------------------
@Test
public void testSize() {
final StrBuilder sb = new StrBuilder();
@ -392,7 +383,6 @@ public class StrBuilderTest {
assertTrue(sb.buffer.length >= 5);
}
//-----------------------------------------------------------------------
@Test
public void testCharAt() {
final StrBuilder sb = new StrBuilder();
@ -410,7 +400,6 @@ public class StrBuilderTest {
IndexOutOfBoundsException.class, () -> sb.charAt(3), "charAt(3) expected IndexOutOfBoundsException");
}
//-----------------------------------------------------------------------
@Test
public void testSetCharAt() {
final StrBuilder sb = new StrBuilder();
@ -433,7 +422,6 @@ public class StrBuilderTest {
assertEquals("bar", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testDeleteCharAt() {
final StrBuilder sb = new StrBuilder("abc");
@ -443,7 +431,6 @@ public class StrBuilderTest {
assertThrows(IndexOutOfBoundsException.class, () -> sb.deleteCharAt(1000));
}
//-----------------------------------------------------------------------
@Test
public void testToCharArray() {
final StrBuilder sb = new StrBuilder();
@ -534,7 +521,6 @@ public class StrBuilderTest {
assertThrows(IndexOutOfBoundsException.class, () -> sb.getChars(4, 2, b, 0));
}
//-----------------------------------------------------------------------
@Test
public void testDeleteIntInt() {
final StrBuilder sb = new StrBuilder("abc");
@ -552,7 +538,6 @@ public class StrBuilderTest {
assertThrows(IndexOutOfBoundsException.class, () -> new StrBuilder("anything").delete(2, 1));
}
//-----------------------------------------------------------------------
@Test
public void testDeleteAll_char() {
StrBuilder sb = new StrBuilder("abcbccba");
@ -702,7 +687,6 @@ public class StrBuilderTest {
assertThrows(IndexOutOfBoundsException.class, () -> sb2.replace(-1, 1, "anything"));
}
//-----------------------------------------------------------------------
@Test
public void testReplaceAll_char_char() {
final StrBuilder sb = new StrBuilder("abcbccba");
@ -718,7 +702,6 @@ public class StrBuilderTest {
assertEquals("defeffed", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testReplaceFirst_char_char() {
final StrBuilder sb = new StrBuilder("abcbccba");
@ -734,7 +717,6 @@ public class StrBuilderTest {
assertEquals("defbccba", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testReplaceAll_String_String() {
StrBuilder sb = new StrBuilder("abcbccba");
@ -795,7 +777,6 @@ public class StrBuilderTest {
assertEquals("xbxb", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testReplaceAll_StrMatcher_String() {
StrBuilder sb = new StrBuilder("abcbccba");
@ -868,7 +849,6 @@ public class StrBuilderTest {
assertEquals("***-A2A3-A4", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testReplace_StrMatcher_String_int_int_int_VaryMatcher() {
StrBuilder sb = new StrBuilder("abcbccba");
@ -1056,7 +1036,6 @@ public class StrBuilderTest {
assertEquals("-x--y-", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testReverse() {
final StrBuilder sb = new StrBuilder();
@ -1067,7 +1046,6 @@ public class StrBuilderTest {
assertEquals("true", sb.reverse().toString());
}
//-----------------------------------------------------------------------
@Test
public void testTrim() {
final StrBuilder sb = new StrBuilder();
@ -1089,7 +1067,6 @@ public class StrBuilderTest {
assertEquals("a b c", sb.trim().toString());
}
//-----------------------------------------------------------------------
@Test
public void testStartsWith() {
final StrBuilder sb = new StrBuilder();
@ -1120,7 +1097,6 @@ public class StrBuilderTest {
assertFalse(sb.endsWith("abc "));
}
//-----------------------------------------------------------------------
@Test
public void testSubSequenceIntInt() {
final StrBuilder sb = new StrBuilder ("hello goodbye");
@ -1558,7 +1534,6 @@ public class StrBuilderTest {
}
};
//-----------------------------------------------------------------------
@Test
public void testAsTokenizer() {
// from Javadoc
@ -1654,7 +1629,6 @@ public class StrBuilderTest {
assertEquals(9, r.read(array, 0, 30));
}
//-----------------------------------------------------------------------
@Test
public void testAsWriter() throws Exception {
final StrBuilder sb = new StrBuilder("base");
@ -1689,7 +1663,6 @@ public class StrBuilderTest {
assertEquals("based", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testEqualsIgnoreCase() {
final StrBuilder sb1 = new StrBuilder();
@ -1713,7 +1686,6 @@ public class StrBuilderTest {
assertTrue(sb1.equalsIgnoreCase(sb2));
}
//-----------------------------------------------------------------------
@Test
public void testEquals() {
final StrBuilder sb1 = new StrBuilder();
@ -1746,7 +1718,6 @@ public class StrBuilderTest {
assertFalse(sb.equals(other));
}
//-----------------------------------------------------------------------
@Test
public void testHashCode() {
final StrBuilder sb = new StrBuilder();
@ -1762,14 +1733,12 @@ public class StrBuilderTest {
assertEquals(hc2a, hc2b);
}
//-----------------------------------------------------------------------
@Test
public void testToString() {
final StrBuilder sb = new StrBuilder("abc");
assertEquals("abc", sb.toString());
}
//-----------------------------------------------------------------------
@Test
public void testToStringBuffer() {
final StrBuilder sb = new StrBuilder();
@ -1779,7 +1748,6 @@ public class StrBuilderTest {
assertEquals(new StringBuffer("junit").toString(), sb.toStringBuffer().toString());
}
//-----------------------------------------------------------------------
@Test
public void testToStringBuilder() {
final StrBuilder sb = new StrBuilder();
@ -1789,7 +1757,6 @@ public class StrBuilderTest {
assertEquals(new StringBuilder("junit").toString(), sb.toStringBuilder().toString());
}
//-----------------------------------------------------------------------
@Test
public void testLang294() {
final StrBuilder sb = new StrBuilder("\n%BLAH%\nDo more stuff\neven more stuff\n%BLAH%\n");
@ -1804,7 +1771,6 @@ public class StrBuilderTest {
assertEquals(-1, sb.indexOf("three"));
}
//-----------------------------------------------------------------------
@Test
public void testLang295() {
final StrBuilder sb = new StrBuilder("onetwothree");
@ -1813,7 +1779,6 @@ public class StrBuilderTest {
assertEquals(-1, sb.indexOf('h'), "The indexOf(char) method is looking beyond the end of the string");
}
//-----------------------------------------------------------------------
@Test
public void testLang412Right() {
final StrBuilder sb = new StrBuilder();
@ -1834,7 +1799,6 @@ public class StrBuilderTest {
assertEquals(sb.toString(), sb.build());
}
//-----------------------------------------------------------------------
@Test
public void testAppendCharBuffer() {
final StrBuilder sb1 = new StrBuilder();
@ -1849,7 +1813,6 @@ public class StrBuilderTest {
assertEquals("12345678", sb2.toString());
}
//-----------------------------------------------------------------------
@Test
public void testAppendToWriter() throws Exception {
final StrBuilder sb = new StrBuilder("1234567890");

View File

@ -33,7 +33,6 @@ import org.junit.jupiter.api.Test;
@Deprecated
public class StrLookupTest {
//-----------------------------------------------------------------------
@Test
public void testNoneLookup() {
assertNull(StrLookup.noneLookup().lookup(null));

View File

@ -34,7 +34,6 @@ public class StrMatcherTest {
private static final char[] BUFFER2 = "abcdef".toCharArray();
//-----------------------------------------------------------------------
@Test
public void testCommaMatcher() {
final StrMatcher matcher = StrMatcher.commaMatcher();
@ -44,7 +43,6 @@ public class StrMatcherTest {
assertEquals(0, matcher.isMatch(BUFFER1, 2));
}
//-----------------------------------------------------------------------
@Test
public void testTabMatcher() {
final StrMatcher matcher = StrMatcher.tabMatcher();
@ -54,7 +52,6 @@ public class StrMatcherTest {
assertEquals(0, matcher.isMatch(BUFFER1, 4));
}
//-----------------------------------------------------------------------
@Test
public void testSpaceMatcher() {
final StrMatcher matcher = StrMatcher.spaceMatcher();
@ -64,7 +61,6 @@ public class StrMatcherTest {
assertEquals(0, matcher.isMatch(BUFFER1, 6));
}
//-----------------------------------------------------------------------
@Test
public void testSplitMatcher() {
final StrMatcher matcher = StrMatcher.splitMatcher();
@ -80,7 +76,6 @@ public class StrMatcherTest {
assertEquals(0, matcher.isMatch(BUFFER1, 10));
}
//-----------------------------------------------------------------------
@Test
public void testTrimMatcher() {
final StrMatcher matcher = StrMatcher.trimMatcher();
@ -96,7 +91,6 @@ public class StrMatcherTest {
assertEquals(1, matcher.isMatch(BUFFER1, 10));
}
//-----------------------------------------------------------------------
@Test
public void testSingleQuoteMatcher() {
final StrMatcher matcher = StrMatcher.singleQuoteMatcher();
@ -106,7 +100,6 @@ public class StrMatcherTest {
assertEquals(0, matcher.isMatch(BUFFER1, 12));
}
//-----------------------------------------------------------------------
@Test
public void testDoubleQuoteMatcher() {
final StrMatcher matcher = StrMatcher.doubleQuoteMatcher();
@ -115,7 +108,6 @@ public class StrMatcherTest {
assertEquals(1, matcher.isMatch(BUFFER1, 12));
}
//-----------------------------------------------------------------------
@Test
public void testQuoteMatcher() {
final StrMatcher matcher = StrMatcher.quoteMatcher();
@ -125,7 +117,6 @@ public class StrMatcherTest {
assertEquals(1, matcher.isMatch(BUFFER1, 12));
}
//-----------------------------------------------------------------------
@Test
public void testNoneMatcher() {
final StrMatcher matcher = StrMatcher.noneMatcher();
@ -145,7 +136,6 @@ public class StrMatcherTest {
assertEquals(0, matcher.isMatch(BUFFER1, 12));
}
//-----------------------------------------------------------------------
@Test
public void testCharMatcher_char() {
final StrMatcher matcher = StrMatcher.charMatcher('c');
@ -157,7 +147,6 @@ public class StrMatcherTest {
assertEquals(0, matcher.isMatch(BUFFER2, 5));
}
//-----------------------------------------------------------------------
@Test
public void testCharSetMatcher_String() {
final StrMatcher matcher = StrMatcher.charSetMatcher("ace");
@ -172,7 +161,6 @@ public class StrMatcherTest {
assertTrue(StrMatcher.charSetMatcher("a") instanceof StrMatcher.CharMatcher);
}
//-----------------------------------------------------------------------
@Test
public void testCharSetMatcher_charArray() {
final StrMatcher matcher = StrMatcher.charSetMatcher("ace".toCharArray());
@ -187,7 +175,6 @@ public class StrMatcherTest {
assertTrue(StrMatcher.charSetMatcher("a".toCharArray()) instanceof StrMatcher.CharMatcher);
}
//-----------------------------------------------------------------------
@Test
public void testStringMatcher_String() {
final StrMatcher matcher = StrMatcher.stringMatcher("bc");
@ -201,7 +188,6 @@ public class StrMatcherTest {
assertSame(StrMatcher.noneMatcher(), StrMatcher.stringMatcher(null));
}
//-----------------------------------------------------------------------
@Test
public void testMatcherIndices() {
// remember that the API contract is tight for the isMatch() method

View File

@ -53,7 +53,6 @@ public class StrSubstitutorTest {
values = null;
}
//-----------------------------------------------------------------------
/**
* Tests simple key replace.
*/
@ -392,7 +391,6 @@ public class StrSubstitutorTest {
sub.replace("The ${animal} jumps over the lazy ${target}. ${undefined.number!1234567890}."));
}
//-----------------------------------------------------------------------
/**
* Tests protected.
*/
@ -415,7 +413,6 @@ public class StrSubstitutorTest {
assertEquals("Hi jakarta!", builder.toString());
}
//-----------------------------------------------------------------------
/**
* Tests constructor.
*/
@ -449,7 +446,6 @@ public class StrSubstitutorTest {
assertEquals("Hi < commons", sub.replace("Hi !< <name2||commons>"));
}
//-----------------------------------------------------------------------
/**
* Tests get set.
*/
@ -527,7 +523,6 @@ public class StrSubstitutorTest {
assertNull(sub.getValueDelimiterMatcher());
}
//-----------------------------------------------------------------------
/**
* Tests static.
*/
@ -615,7 +610,6 @@ public class StrSubstitutorTest {
assertEquals("value $${escaped}", sub.replace(org));
}
//-----------------------------------------------------------------------
private void doTestReplace(final String expectedResult, final String replaceTemplate, final boolean substring) {
final String expectedShortResult = expectedResult.substring(1, expectedResult.length() - 1);
final StrSubstitutor sub = new StrSubstitutor(values);

View File

@ -497,7 +497,6 @@ public class StrTokenizerTest {
assertFalse(tok.hasNext());
}
//-----------------------------------------------------------------------
@Test
public void testListArray() {
final String input = "a b c";
@ -509,7 +508,6 @@ public class StrTokenizerTest {
assertEquals(3, list.size());
}
//-----------------------------------------------------------------------
private void testCSV(final String data) {
this.testXSVAbc(StrTokenizer.getCSVInstance(data));
this.testXSVAbc(StrTokenizer.getCSVInstance(data.toCharArray()));
@ -555,7 +553,6 @@ public class StrTokenizerTest {
assertNull(tok.getContent());
}
//-----------------------------------------------------------------------
@Test
public void testChaining() {
final StrTokenizer tok = new StrTokenizer();
@ -634,7 +631,6 @@ public class StrTokenizerTest {
assertFalse(tok.hasNext());
}
//-----------------------------------------------------------------------
@Test
public void testConstructor_String_char() {
StrTokenizer tok = new StrTokenizer("a b", ' ');
@ -650,7 +646,6 @@ public class StrTokenizerTest {
assertFalse(tok.hasNext());
}
//-----------------------------------------------------------------------
@Test
public void testConstructor_String_char_char() {
StrTokenizer tok = new StrTokenizer("a b", ' ', '"');
@ -667,7 +662,6 @@ public class StrTokenizerTest {
assertFalse(tok.hasNext());
}
//-----------------------------------------------------------------------
@Test
public void testConstructor_charArray() {
StrTokenizer tok = new StrTokenizer("a b".toCharArray());
@ -682,7 +676,6 @@ public class StrTokenizerTest {
assertFalse(tok.hasNext());
}
//-----------------------------------------------------------------------
@Test
public void testConstructor_charArray_char() {
StrTokenizer tok = new StrTokenizer("a b".toCharArray(), ' ');
@ -698,7 +691,6 @@ public class StrTokenizerTest {
assertFalse(tok.hasNext());
}
//-----------------------------------------------------------------------
@Test
public void testConstructor_charArray_char_char() {
StrTokenizer tok = new StrTokenizer("a b".toCharArray(), ' ', '"');
@ -715,7 +707,6 @@ public class StrTokenizerTest {
assertFalse(tok.hasNext());
}
//-----------------------------------------------------------------------
@Test
public void testReset() {
final StrTokenizer tok = new StrTokenizer("a b c");
@ -731,7 +722,6 @@ public class StrTokenizerTest {
assertFalse(tok.hasNext());
}
//-----------------------------------------------------------------------
@Test
public void testReset_String() {
final StrTokenizer tok = new StrTokenizer("x x x");
@ -744,7 +734,6 @@ public class StrTokenizerTest {
assertFalse(tok.hasNext());
}
//-----------------------------------------------------------------------
@Test
public void testReset_charArray() {
final StrTokenizer tok = new StrTokenizer("x x x");
@ -758,7 +747,6 @@ public class StrTokenizerTest {
assertFalse(tok.hasNext());
}
//-----------------------------------------------------------------------
@Test
public void testTSV() {
this.testXSVAbc(StrTokenizer.getTSVInstance(TSV_SIMPLE_FIXTURE));
@ -823,7 +811,6 @@ public class StrTokenizerTest {
assertFalse(tkn.hasNext());
}
//-----------------------------------------------------------------------
@Test
public void testTokenizeSubclassInputChange() {
final StrTokenizer tkn = new StrTokenizer("a b c d e") {
@ -836,7 +823,6 @@ public class StrTokenizerTest {
assertEquals("y", tkn.next());
}
//-----------------------------------------------------------------------
@Test
public void testTokenizeSubclassOutputChange() {
final StrTokenizer tkn = new StrTokenizer("a b c") {
@ -852,7 +838,6 @@ public class StrTokenizerTest {
assertEquals("a", tkn.next());
}
//-----------------------------------------------------------------------
@Test
public void testToString() {
final StrTokenizer tkn = new StrTokenizer("a b c d e");

View File

@ -33,7 +33,6 @@ import org.junit.jupiter.api.Test;
@Deprecated
public class WordUtilsTest {
//-----------------------------------------------------------------------
@Test
public void testConstructor() {
assertNotNull(new WordUtils());
@ -44,7 +43,6 @@ public class WordUtilsTest {
assertFalse(Modifier.isFinal(WordUtils.class.getModifiers()));
}
//-----------------------------------------------------------------------
@Test
public void testWrap_StringInt() {
assertNull(WordUtils.wrap(null, 20));
@ -182,7 +180,6 @@ public class WordUtilsTest {
assertEquals(expected, WordUtils.wrap(input, 15, "\n", true, "/"));
}
//-----------------------------------------------------------------------
@Test
public void testCapitalize_String() {
assertNull(WordUtils.capitalize(null));
@ -299,7 +296,6 @@ public class WordUtilsTest {
assertEquals("i aM.FINE", WordUtils.uncapitalize("I AM.FINE", null) );
}
//-----------------------------------------------------------------------
@Test
public void testInitials_String() {
assertNull(WordUtils.initials(null));

View File

@ -56,7 +56,6 @@ public class DateFormatUtilsTest {
return cal;
}
//-----------------------------------------------------------------------
@Test
public void testConstructor() {
assertNotNull(new DateFormatUtils());
@ -81,7 +80,6 @@ public class DateFormatUtilsTest {
testUTC("2002-02-23T09:11:12Z", DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.getPattern());
}
//-----------------------------------------------------------------------
@Test
public void testFormat() {
final Calendar c = Calendar.getInstance(FastTimeZone.getGmtTimeZone());
@ -105,7 +103,6 @@ public class DateFormatUtilsTest {
assertEquals(buffer.toString(), DateFormatUtils.format(c.getTime().getTime(), "yyyyMdH", Locale.US));
}
//-----------------------------------------------------------------------
@Test
public void testFormatCalendar() {
final Calendar c = Calendar.getInstance(FastTimeZone.getGmtTimeZone());

View File

@ -144,7 +144,6 @@ public class DateUtilsTest {
private TimeZone defaultZone = null;
//-----------------------------------------------------------------------
private void assertDate(final Date date, final int year, final int month, final int day, final int hour, final int min, final int sec, final int mil) {
final GregorianCalendar cal = new GregorianCalendar();
cal.setTime(date);
@ -215,7 +214,6 @@ public class DateUtilsTest {
}
}
//-----------------------------------------------------------------------
@Test
public void testAddDays() throws Exception {
Date result = DateUtils.addDays(BASE_DATE, 0);
@ -234,7 +232,6 @@ public class DateUtilsTest {
assertDate(result, 2000, 6, 4, 4, 3, 2, 1);
}
//-----------------------------------------------------------------------
@Test
public void testAddHours() throws Exception {
Date result = DateUtils.addHours(BASE_DATE, 0);
@ -253,7 +250,6 @@ public class DateUtilsTest {
assertDate(result, 2000, 6, 5, 3, 3, 2, 1);
}
//-----------------------------------------------------------------------
@Test
public void testAddMilliseconds() throws Exception {
Date result = DateUtils.addMilliseconds(BASE_DATE, 0);
@ -272,7 +268,6 @@ public class DateUtilsTest {
assertDate(result, 2000, 6, 5, 4, 3, 2, 0);
}
//-----------------------------------------------------------------------
@Test
public void testAddMinutes() throws Exception {
Date result = DateUtils.addMinutes(BASE_DATE, 0);
@ -291,7 +286,6 @@ public class DateUtilsTest {
assertDate(result, 2000, 6, 5, 4, 2, 2, 1);
}
//-----------------------------------------------------------------------
@Test
public void testAddMonths() throws Exception {
Date result = DateUtils.addMonths(BASE_DATE, 0);
@ -310,7 +304,6 @@ public class DateUtilsTest {
assertDate(result, 2000, 5, 5, 4, 3, 2, 1);
}
//-----------------------------------------------------------------------
@Test
public void testAddSeconds() throws Exception {
Date result = DateUtils.addSeconds(BASE_DATE, 0);
@ -329,7 +322,6 @@ public class DateUtilsTest {
assertDate(result, 2000, 6, 5, 4, 3, 1, 1);
}
//-----------------------------------------------------------------------
@Test
public void testAddWeeks() throws Exception {
Date result = DateUtils.addWeeks(BASE_DATE, 0);
@ -348,7 +340,6 @@ public class DateUtilsTest {
assertDate(result, 2000, 5, 28, 4, 3, 2, 1); // june
}
//-----------------------------------------------------------------------
@Test
public void testAddYears() throws Exception {
Date result = DateUtils.addYears(BASE_DATE, 0);
@ -597,7 +588,6 @@ public class DateUtilsTest {
assertEquals(0, cal.get(Calendar.HOUR));
}
//-----------------------------------------------------------------------
@Test
public void testConstructor() {
assertNotNull(new DateUtils());
@ -608,7 +598,6 @@ public class DateUtilsTest {
assertFalse(Modifier.isFinal(DateUtils.class.getModifiers()));
}
//-----------------------------------------------------------------------
@Test
public void testIsSameDay_Cal() {
final GregorianCalendar cala = new GregorianCalendar(2004, 6, 9, 13, 45);
@ -637,7 +626,6 @@ public class DateUtilsTest {
assertThrows(IllegalArgumentException.class, () -> DateUtils.isSameDay((Calendar) null, null));
}
//-----------------------------------------------------------------------
@Test
public void testIsSameDay_Date() {
Date datea = new GregorianCalendar(2004, 6, 9, 13, 45).getTime();
@ -666,7 +654,6 @@ public class DateUtilsTest {
assertThrows(IllegalArgumentException.class, () -> DateUtils.isSameDay((Date) null, null));
}
//-----------------------------------------------------------------------
@Test
public void testIsSameInstant_Cal() {
final GregorianCalendar cala = new GregorianCalendar(TimeZone.getTimeZone("GMT+1"));
@ -696,7 +683,6 @@ public class DateUtilsTest {
assertThrows(IllegalArgumentException.class, () -> DateUtils.isSameInstant((Calendar) null, null));
}
//-----------------------------------------------------------------------
@Test
public void testIsSameInstant_Date() {
Date datea = new GregorianCalendar(2004, 6, 9, 13, 45).getTime();
@ -725,7 +711,6 @@ public class DateUtilsTest {
assertThrows(IllegalArgumentException.class, () -> DateUtils.isSameInstant((Date) null, null));
}
//-----------------------------------------------------------------------
@Test
public void testIsSameLocalTime_Cal() {
final GregorianCalendar cala = new GregorianCalendar(TimeZone.getTimeZone("GMT+1"));
@ -867,7 +852,6 @@ public class DateUtilsTest {
assertThrows(IllegalArgumentException.class, () -> DateUtils.parseDate("19721203", (String[]) null));
}
//-----------------------------------------------------------------------
@Test
public void testParseDate() throws Exception {
final GregorianCalendar cal = new GregorianCalendar(1972, 11, 3);
@ -916,7 +900,6 @@ public class DateUtilsTest {
assertThrows(ParseException.class, () -> DateUtils.parseDateStrictly(dateStr, parsers));
}
//-----------------------------------------------------------------------
/**
* Tests various values with the round method
*
@ -1322,14 +1305,12 @@ public class DateUtilsTest {
assertDate(result, 2005, 6, 5, 4, 3, 2, 1);
}
//-----------------------------------------------------------------------
@Test
public void testToCalendar() {
assertEquals(date1, DateUtils.toCalendar(date1).getTime(), "Failed to convert to a Calendar and back");
assertThrows(NullPointerException.class, () -> DateUtils.toCalendar(null));
}
//-----------------------------------------------------------------------
@Test
public void testToCalendarWithDateAndTimeZoneNotNull() {
final Calendar c = DateUtils.toCalendar(date2, defaultZone);
@ -1337,19 +1318,16 @@ public class DateUtilsTest {
assertEquals(defaultZone, c.getTimeZone(), "Convert Date and TimeZone to a Calendar, but failed to get the TimeZone back");
}
//-----------------------------------------------------------------------
@Test
public void testToCalendarWithDateAndTimeZoneNull() {
assertThrows(NullPointerException.class, () -> DateUtils.toCalendar(null, null));
}
//-----------------------------------------------------------------------
@Test
public void testToCalendarWithDateNull() {
assertThrows(NullPointerException.class, () -> DateUtils.toCalendar(null, zone));
}
//-----------------------------------------------------------------------
@Test
public void testToCalendarWithTimeZoneNull() {
assertThrows(NullPointerException.class, () -> DateUtils.toCalendar(date1, null));