Marcono1234 commented on a change in pull request #471:
URL: https://github.com/apache/logging-log4j2/pull/471#discussion_r585119540



##########
File path: 
log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterFormatter.java
##########
@@ -448,7 +450,7 @@ static String deepToString(final Object o) {
      * @param str    the StringBuilder that o will be appended to
      * @param dejaVu a list of container identities that were already used.
      */
-    static void recursiveDeepToString(final Object o, final StringBuilder str, 
final Set<String> dejaVu) {
+    static void recursiveDeepToString(final Object o, final StringBuilder str, 
final Set<Object> dejaVu) {

Review comment:
       Would it make sense to make this method private and instead add a 
package-private overload `recursiveDeepToString(Object, StringBuilder)`?
   Most of the calls to this method have `null` as dejaVu, and especially the 
calls from `MapMessage` should not have to care about how recursion tracking is 
implemented.

##########
File path: 
log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterFormatter.java
##########
@@ -448,7 +450,7 @@ static String deepToString(final Object o) {
      * @param str    the StringBuilder that o will be appended to
      * @param dejaVu a list of container identities that were already used.

Review comment:
       
   ```suggestion
        * @param dejaVu a set of container objects directly or transitively 
containing {@code o}
   ```




----------------------------------------------------------------
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]


Reply via email to