From ae1d3c5c4c2b21ff0c859b33c9f53172c76526f6 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Use the static constant rather than instantiating.
*/ MultiLineToStringStyle() { - this.setContentStart("["); - this.setFieldSeparator(System.lineSeparator() + " "); - this.setFieldSeparatorAtStart(true); - this.setContentEnd(System.lineSeparator() + "]"); + setContentStart("["); + setFieldSeparator(System.lineSeparator() + " "); + setFieldSeparatorAtStart(true); + setContentEnd(System.lineSeparator() + "]"); } /** @@ -479,8 +479,8 @@ public abstract class ToStringStyle implements Serializable { *Use the static constant rather than instantiating.
*/ NoClassNameToStringStyle() { - this.setUseClassName(false); - this.setUseIdentityHashCode(false); + setUseClassName(false); + setUseIdentityHashCode(false); } /** @@ -511,7 +511,7 @@ public abstract class ToStringStyle implements Serializable { *Use the static constant rather than instantiating.
*/ NoFieldNameToStringStyle() { - this.setUseFieldNames(false); + setUseFieldNames(false); } /** @@ -542,8 +542,8 @@ public abstract class ToStringStyle implements Serializable { *Use the static constant rather than instantiating.
*/ ShortPrefixToStringStyle() { - this.setUseShortClassName(true); - this.setUseIdentityHashCode(false); + setUseShortClassName(true); + setUseIdentityHashCode(false); } /** @@ -573,11 +573,11 @@ public abstract class ToStringStyle implements Serializable { *Use the static constant rather than instantiating.
*/ SimpleToStringStyle() { - this.setUseClassName(false); - this.setUseIdentityHashCode(false); - this.setUseFieldNames(false); - this.setContentStart(StringUtils.EMPTY); - this.setContentEnd(StringUtils.EMPTY); + setUseClassName(false); + setUseIdentityHashCode(false); + setUseFieldNames(false); + setContentStart(StringUtils.EMPTY); + setContentEnd(StringUtils.EMPTY); } /** @@ -1667,7 +1667,7 @@ public abstract class ToStringStyle implements Serializable { * @param object the {@link Object} whose id to output */ protected void appendIdentityHashCode(final StringBuffer buffer, final Object object) { - if (this.isUseIdentityHashCode() && object != null) { + if (isUseIdentityHashCode() && object != null) { register(object); buffer.append('@'); buffer.append(ObjectUtils.identityHashCodeHex(object));