[
https://issues.apache.org/jira/browse/IGNITE-602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15974804#comment-15974804
]
Andrey Gura commented on IGNITE-602:
------------------------------------
[~SomeFire], to be honest I can't understand the main idea of this fix. Also I
have simple test case that still fails:
{code:java}
/**
* @throws Exception If failed.
*/
public void testToStringCheckAdvancedRecursionPrevention2() throws
Exception {
Node n1 = new Node();
Node n2 = new Node();
n1.next = n2;
n2.next = n1;
System.out.println(n1);
System.out.println(n2);
}
private static class Node {
@GridToStringInclude
Node next;
@Override public String toString() {
return GridToStringBuilder.toString(Node.class, this);
}
}
{code}
> [Test] GridToStringBuilder is vulnerable for StackOverflowError caused by
> infinite recursion
> --------------------------------------------------------------------------------------------
>
> Key: IGNITE-602
> URL: https://issues.apache.org/jira/browse/IGNITE-602
> Project: Ignite
> Issue Type: Bug
> Components: general
> Reporter: Artem Shutak
> Assignee: Ryabov Dmitrii
> Labels: Muted_test
> Fix For: 2.1
>
>
> See test
> org.gridgain.grid.util.tostring.GridToStringBuilderSelfTest#_testToStringCheckAdvancedRecursionPrevention
> and related TODO in same source file.
> Also take a look at
> http://stackoverflow.com/questions/11300203/most-efficient-way-to-prevent-an-infinite-recursion-in-tostring
> Test should be unmuted on TC after fix.
> see GG-5000.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)