CharUtilsTest has several instances of the following pattern:
try {
CharUtils.someMethod("illegal input");
} catch (final IllegalArgumentException ex) {}
This pattern is not very useful for testing, as the test would pass
whether an IllegalArgumentException is thrown or not. This patch
enhances the test by explicitly failing it if the exception is not
thrown:
try {
CharUtils.someMethod("illegal input");
fail("An IllegalArgumentException should have been thrown");
} catch (final IllegalArgumentException ex) {}
The loop currently loops only up to 128, thus testing just positive
return values of CharUtils#isAscii(char). This patch increase the loop
to go over all the possible values of an unsigned byte, thus testing
also negative return values.
The if statement calls assertTrue on the if branch and assertFalse on
the else branch on the same expression. This can easily be simplified
to assertEquals with a boolean expression to make the code clean and
easier to read.
Commit 56e830a removed all the old XYZRange classes from
org.apache.lang3.math, and left only the generic Range<T> class.
This patch removes the left-over findbugs exclusions for those
classes.
maven java9 profile:
- use maven-javadoc-plugin version 3.0.0-M1, because versions below 3.0.0 do not work on java 9
- skip maven-coveralls-plugin, because version 4.3.0 does not work on java 9, see https://github.com/trautonen/coveralls-maven-plugin/issues/112
ExceptionUtils#getStackFrame(String)'s javadoc contains a broken
reference to SystemUtils#LINE_SEPARATOR (as the class name is not
fully qualified, and there's no import of
org.apache.commons.lang3.SystemUtils).
This patch fixes the broken reference by replacing it it with a
reference to System#lineSeparator(), which the method actually uses.
Replacing the static constants in CharEncoding with computed values can
cause compatibility issues, since compile time constants are inlined by
the compiler.
compatibility.
This change duplicates adds some maven-jar-plugin configuration pom.
After we have implemented a solution for this in parent pom, this
confgiruation should be removed.