This patch replaces int literals that were cast to longs (e.g.,
"(long) 1)" with long literals (e.g., "1L"), making the code cleaner
and easier to maintain.
Long literals can be specified by a lower case l (e.g., 1l) or by an
uppercase one (e.g., 1L).
This patch converts all existing long literals to use the uppercase L,
as in some terminals, the lowercase l and the 1 characters are
graphically similar, leading to possible confusions.
Fix build on Java 9 Build 157 by adding a java-9 maven profile. This is activated by default on Java 9 and opens up java.base classes for reflection, which makes all unit tests pass.
The junit.framework package has been deprecated, and should no longer
be used.
This patch fixes the one remaining import from it to statically import
org.junit.Assert.assertNull instead.
Use JUnit's assertFalse for assertions with conditions instead of
re-implementing the logic here by testing the condition and throwing an
AssertionFailureException if the condition is met.
Since the project no longer supports Java versions older than 6, it's
safe to use the enhanced for loop syntax introduced in Java 5.
This patch employs this syntax where possible to clean up the code.
A {@link} javadoc can only reference a resolvable class name. The
{@link} tag in NestingPerson's javadoc is thus broken, as it directly
references JsonToStringStyle without qualifying it with the enclosing
ToStringStyle class.
This patch adds the enclosing class to the javadoc, thus "unbreaking"
the reference.
The javadoc refers to a formatField parameter, which the method doesn't
have.
Reading the description and the method's code, this documentation
clearly refers to the f parameter.
This patch fixes the javadoc and aligns it with the method's parameters.
While enums allow ending the member list in a semicolon(;), it's
redundant. Some enums in the codebase use a semicolon in the end, and
some do not.
This patch standardizes the codebase's enum and cleans up the code by
removing these semicolons.
While calling String.format("some string") without any additional
arguments is not technically wrong, it's redundant, as it just
returns the same string.
Removing these calls and just using the string instead both cleans up
the code and offers a (very slight) performance gain.
This patch employs Java 7's syntax to catch multiple exceptions in
the same block with the | operator to make ObjectUtilsTest's code
cleaner and easier to read.
The Javadoc of SystemDefaultsSwitch contains some broken @literal tags.
Instead of {@literal @} to insert a '@' into the HTML, {@literal@}
without the space is used, which does not work.