garydgregory commented on PR #1846:
URL: https://github.com/apache/commons-lang/pull/1846#issuecomment-6558297002

   -1: This PR introduces a regression demonstrated by the tests in 
c833cc1ef672052597f8e7246fbb7db9e1f2d059. Both tests pass before this PR and 
fail with it applied unchanged. Please rebase on git master.
   
   An empty `VISITED` set does not necessarily identify an outermost call. An 
outer builder using the default style can invoke an object's `toString()`, 
which performs recursive reflection. That nested call can start with an empty 
visited set, incorrectly set `topLevel = true`, and clear the shared state 
before the outer output is complete.
   
   With two holders referencing the same child, the expected output renders the 
child in detail once and abbreviates its second occurrence. This PR renders it 
in detail twice, changing the output and repeating traversal. The tests cover 
both manual and reflection-based outer builders.
   
   Traversal ownership needs to be tracked explicitly rather than inferred from 
whether `VISITED` is empty.


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to