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;
|
||||
}
|
||||
|
||||
final String try_value_str = value.toString();
|
||||
if (try_value_str.startsWith(getContentStart()) && try_value_str.endsWith(getContentEnd())
|
||||
|| try_value_str.startsWith(getArrayStart()) && try_value_str.startsWith(getArrayEnd())
|
||||
final String valueAsString = value.toString();
|
||||
if (valueAsString.startsWith(getContentStart()) && valueAsString.endsWith(getContentEnd())
|
||||
|| valueAsString.startsWith(getArrayStart()) && valueAsString.startsWith(getArrayEnd())
|
||||
) {
|
||||
|
||||
buffer.append(value);
|
||||
return;
|
||||
}
|
||||
|
||||
appendDetail(buffer, fieldName, try_value_str);
|
||||
appendDetail(buffer, fieldName, valueAsString);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -111,7 +111,7 @@ public class JsonToStringStyleTest {
|
|||
public void testDate() {
|
||||
|
||||
final Date now = new Date();
|
||||
final Date after_now = new Date(System.currentTimeMillis() + 1);
|
||||
final Date afterNow = new Date(System.currentTimeMillis() + 1);
|
||||
|
||||
try {
|
||||
new ToStringBuilder(base).append(now).toString();
|
||||
|
@ -121,7 +121,7 @@ public class JsonToStringStyleTest {
|
|||
|
||||
assertEquals("{\"now\":\"" + now.toString() +"\"}", new ToStringBuilder(base).append("now", now)
|
||||
.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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue