daniellansun opened a new pull request, #3330: URL: https://github.com/apache/groovy/pull/3330
https://issues.apache.org/jira/browse/GROOVY-3250 Nested and mixed `List`/`Map` cycles, and array cycles, overflowed when formatted with `toString`, `inspect`, `toListString`, `toMapString`, or `toArrayString`. Direct self-references already used the `(this Collection)` / `(this Map)` / `(this array)` markers; this change uses the same markers when a container is already on the current unbounded render path. Size-limited formatting still unrolls a structural cycle until the existing truncate applies, so results such as `animals.toListString(40)` stay the same. The render path is a thread-local identity set and is removed when the root render finishes, including if an element `toString` throws. `testGroovy3250` now runs as a regular test; its assertions are unchanged. Further cycle and cleanup coverage is in `GroovyMethodsTest` and `InvokerHelperFormattingTest`. -- 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]
