Remove redundant syntax

This commit is contained in:
Gary Gregory 2024-09-12 10:20:52 -04:00
parent 91fde94b49
commit ae1d3c5c4c
1 changed files with 28 additions and 28 deletions

View File

@ -127,25 +127,25 @@ public abstract class ToStringStyle implements Serializable {
* </p> * </p>
*/ */
JsonToStringStyle() { JsonToStringStyle() {
this.setUseClassName(false); setUseClassName(false);
this.setUseIdentityHashCode(false); setUseIdentityHashCode(false);
this.setContentStart("{"); setContentStart("{");
this.setContentEnd("}"); setContentEnd("}");
this.setArrayStart("["); setArrayStart("[");
this.setArrayEnd("]"); setArrayEnd("]");
this.setFieldSeparator(","); setFieldSeparator(",");
this.setFieldNameValueSeparator(":"); setFieldNameValueSeparator(":");
this.setNullText("null"); setNullText("null");
this.setSummaryObjectStartText("\"<"); setSummaryObjectStartText("\"<");
this.setSummaryObjectEndText(">\""); setSummaryObjectEndText(">\"");
this.setSizeStartText("\"<size="); setSizeStartText("\"<size=");
this.setSizeEndText(">\""); setSizeEndText(">\"");
} }
@Override @Override
@ -445,10 +445,10 @@ public abstract class ToStringStyle implements Serializable {
* <p>Use the static constant rather than instantiating.</p> * <p>Use the static constant rather than instantiating.</p>
*/ */
MultiLineToStringStyle() { MultiLineToStringStyle() {
this.setContentStart("["); setContentStart("[");
this.setFieldSeparator(System.lineSeparator() + " "); setFieldSeparator(System.lineSeparator() + " ");
this.setFieldSeparatorAtStart(true); setFieldSeparatorAtStart(true);
this.setContentEnd(System.lineSeparator() + "]"); setContentEnd(System.lineSeparator() + "]");
} }
/** /**
@ -479,8 +479,8 @@ public abstract class ToStringStyle implements Serializable {
* <p>Use the static constant rather than instantiating.</p> * <p>Use the static constant rather than instantiating.</p>
*/ */
NoClassNameToStringStyle() { NoClassNameToStringStyle() {
this.setUseClassName(false); setUseClassName(false);
this.setUseIdentityHashCode(false); setUseIdentityHashCode(false);
} }
/** /**
@ -511,7 +511,7 @@ public abstract class ToStringStyle implements Serializable {
* <p>Use the static constant rather than instantiating.</p> * <p>Use the static constant rather than instantiating.</p>
*/ */
NoFieldNameToStringStyle() { NoFieldNameToStringStyle() {
this.setUseFieldNames(false); setUseFieldNames(false);
} }
/** /**
@ -542,8 +542,8 @@ public abstract class ToStringStyle implements Serializable {
* <p>Use the static constant rather than instantiating.</p> * <p>Use the static constant rather than instantiating.</p>
*/ */
ShortPrefixToStringStyle() { ShortPrefixToStringStyle() {
this.setUseShortClassName(true); setUseShortClassName(true);
this.setUseIdentityHashCode(false); setUseIdentityHashCode(false);
} }
/** /**
@ -573,11 +573,11 @@ public abstract class ToStringStyle implements Serializable {
* <p>Use the static constant rather than instantiating.</p> * <p>Use the static constant rather than instantiating.</p>
*/ */
SimpleToStringStyle() { SimpleToStringStyle() {
this.setUseClassName(false); setUseClassName(false);
this.setUseIdentityHashCode(false); setUseIdentityHashCode(false);
this.setUseFieldNames(false); setUseFieldNames(false);
this.setContentStart(StringUtils.EMPTY); setContentStart(StringUtils.EMPTY);
this.setContentEnd(StringUtils.EMPTY); setContentEnd(StringUtils.EMPTY);
} }
/** /**
@ -1667,7 +1667,7 @@ public abstract class ToStringStyle implements Serializable {
* @param object the {@link Object} whose id to output * @param object the {@link Object} whose id to output
*/ */
protected void appendIdentityHashCode(final StringBuffer buffer, final Object object) { protected void appendIdentityHashCode(final StringBuffer buffer, final Object object) {
if (this.isUseIdentityHashCode() && object != null) { if (isUseIdentityHashCode() && object != null) {
register(object); register(object);
buffer.append('@'); buffer.append('@');
buffer.append(ObjectUtils.identityHashCodeHex(object)); buffer.append(ObjectUtils.identityHashCodeHex(object));