Variable names should follow naming conventions
This commit is contained in:
parent
448ec93f00
commit
07ec8ad2dd
|
@ -2585,16 +2585,16 @@ public abstract class ToStringStyle implements Serializable {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final String try_value_str = value.toString();
|
final String valueAsString = value.toString();
|
||||||
if (try_value_str.startsWith(getContentStart()) && try_value_str.endsWith(getContentEnd())
|
if (valueAsString.startsWith(getContentStart()) && valueAsString.endsWith(getContentEnd())
|
||||||
|| try_value_str.startsWith(getArrayStart()) && try_value_str.startsWith(getArrayEnd())
|
|| valueAsString.startsWith(getArrayStart()) && valueAsString.startsWith(getArrayEnd())
|
||||||
) {
|
) {
|
||||||
|
|
||||||
buffer.append(value);
|
buffer.append(value);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
appendDetail(buffer, fieldName, try_value_str);
|
appendDetail(buffer, fieldName, valueAsString);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -111,7 +111,7 @@ public class JsonToStringStyleTest {
|
||||||
public void testDate() {
|
public void testDate() {
|
||||||
|
|
||||||
final Date now = new Date();
|
final Date now = new Date();
|
||||||
final Date after_now = new Date(System.currentTimeMillis() + 1);
|
final Date afterNow = new Date(System.currentTimeMillis() + 1);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
new ToStringBuilder(base).append(now).toString();
|
new ToStringBuilder(base).append(now).toString();
|
||||||
|
@ -121,7 +121,7 @@ public class JsonToStringStyleTest {
|
||||||
|
|
||||||
assertEquals("{\"now\":\"" + now.toString() +"\"}", new ToStringBuilder(base).append("now", now)
|
assertEquals("{\"now\":\"" + now.toString() +"\"}", new ToStringBuilder(base).append("now", now)
|
||||||
.toString());
|
.toString());
|
||||||
assertEquals("{\"now\":\"" + now.toString() +"\",\"after\":\"" + after_now.toString() + "\"}", new ToStringBuilder(base).append("now", now).append("after", after_now)
|
assertEquals("{\"now\":\"" + now.toString() +"\",\"after\":\"" + afterNow.toString() + "\"}", new ToStringBuilder(base).append("now", now).append("after", afterNow)
|
||||||
.toString());
|
.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue