carterkozak commented on a change in pull request #471:
URL: https://github.com/apache/logging-log4j2/pull/471#discussion_r585530427
##########
File path:
log4j-api/src/test/java/org/apache/logging/log4j/message/ParameterFormatterTest.java
##########
@@ -180,13 +182,29 @@ public void testDeepToString() throws Exception {
}
@Test
- public void testIdentityToString() throws Exception {
+ public void testDeepToStringUsingNonRecursiveButConsequentObjects() {
final List<Object> list = new ArrayList<>();
+ final Object item = Collections.singletonList(0);
list.add(1);
+ list.add(item);
+ list.add(2);
+ list.add(item);
+ list.add(3);
+ final String actual = ParameterFormatter.deepToString(list);
+ final String expected = "[1, [0], 2, [0], 3]";
+ assertEquals(expected, actual);
+ }
Review comment:
Thanks!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]