diff --git a/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java b/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java index f86fae431..0911def2f 100644 --- a/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java +++ b/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java @@ -213,11 +213,11 @@ public class EqualsBuilder implements Builder { */ private boolean isEquals = true; - private boolean testTransients = false; - private boolean testRecursive = false; + private boolean testTransients; + private boolean testRecursive; private List> bypassReflectionClasses; - private Class reflectUpToClass = null; - private String[] excludeFields = null; + private Class reflectUpToClass; + private String[] excludeFields; /** *

Constructor for EqualsBuilder.

diff --git a/src/main/java/org/apache/commons/lang3/builder/HashCodeBuilder.java b/src/main/java/org/apache/commons/lang3/builder/HashCodeBuilder.java index 75eb3e38b..319f70457 100644 --- a/src/main/java/org/apache/commons/lang3/builder/HashCodeBuilder.java +++ b/src/main/java/org/apache/commons/lang3/builder/HashCodeBuilder.java @@ -536,7 +536,7 @@ public class HashCodeBuilder implements Builder { /** * Running total of the hashCode. */ - private int iTotal = 0; + private int iTotal; /** *

diff --git a/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java b/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java index 63ad959d1..a763029e9 100644 --- a/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java +++ b/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java @@ -441,12 +441,12 @@ public class ReflectionToStringBuilder extends ToStringBuilder { /** * Whether or not to append static fields. */ - private boolean appendStatics = false; + private boolean appendStatics; /** * Whether or not to append transient fields. */ - private boolean appendTransients = false; + private boolean appendTransients; /** * Whether or not to append fields that are null. @@ -463,7 +463,7 @@ public class ReflectionToStringBuilder extends ToStringBuilder { /** * The last super class to stop appending fields for. */ - private Class upToClass = null; + private Class upToClass; /** *

diff --git a/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java b/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java index 962056ade..3497c3646 100644 --- a/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java +++ b/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java @@ -263,7 +263,7 @@ public abstract class ToStringStyle implements Serializable { /** * Whether to use short class names, the default is {@code false}. */ - private boolean useShortClassName = false; + private boolean useShortClassName; /** * Whether to use the identity hash code, the default is {@code true}. @@ -288,12 +288,12 @@ public abstract class ToStringStyle implements Serializable { /** * Whether the field separator should be added before any other fields. */ - private boolean fieldSeparatorAtStart = false; + private boolean fieldSeparatorAtStart; /** * Whether the field separator should be added after any other fields. */ - private boolean fieldSeparatorAtEnd = false; + private boolean fieldSeparatorAtEnd; /** * The field separator {@code ','}. diff --git a/src/main/java/org/apache/commons/lang3/math/Fraction.java b/src/main/java/org/apache/commons/lang3/math/Fraction.java index ba077dfe7..5979d8c09 100644 --- a/src/main/java/org/apache/commons/lang3/math/Fraction.java +++ b/src/main/java/org/apache/commons/lang3/math/Fraction.java @@ -104,15 +104,15 @@ public final class Fraction extends Number implements Comparable { /** * Cached output hashCode (class is immutable). */ - private transient int hashCode = 0; + private transient int hashCode; /** * Cached output toString (class is immutable). */ - private transient String toString = null; + private transient String toString; /** * Cached output toProperString (class is immutable). */ - private transient String toProperString = null; + private transient String toProperString; /** *

Constructs a {@code Fraction} instance with the 2 parts diff --git a/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java b/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java index ed6c05abc..44d16a1f6 100644 --- a/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java +++ b/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java @@ -173,7 +173,7 @@ public class StrSubstitutor { /** * Whether escapes should be preserved. Default is false; */ - private boolean preserveEscapes = false; + private boolean preserveEscapes; //----------------------------------------------------------------------- /** diff --git a/src/main/java/org/apache/commons/lang3/text/StrTokenizer.java b/src/main/java/org/apache/commons/lang3/text/StrTokenizer.java index 0cc5d8976..01063c718 100644 --- a/src/main/java/org/apache/commons/lang3/text/StrTokenizer.java +++ b/src/main/java/org/apache/commons/lang3/text/StrTokenizer.java @@ -126,7 +126,7 @@ public class StrTokenizer implements ListIterator, Cloneable { private StrMatcher trimmerMatcher = StrMatcher.noneMatcher(); /** Whether to return empty tokens as null */ - private boolean emptyAsNull = false; + private boolean emptyAsNull; /** Whether to ignore empty tokens */ private boolean ignoreEmptyTokens = true;