New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AbstractTreeModel equals ends in StackOverflowError #401

Closed
stmoeller opened this Issue Sep 15, 2017 · 0 comments

Comments

Projects
None yet
2 participants
@stmoeller
Copy link

stmoeller commented Sep 15, 2017

Running equals on a TreeModel ends in StackOverflowError:

        ListTreeModel<ExampleEntity> modelA = new ListTreeModel<>();
        modelA.addChild(new ExampleEntity(1L, "One"))
                .addChild(new ExampleEntity(2L, "Two")).getParent()
                .addChild(new ExampleEntity(3L, "Three")).getParent()
                .getParent()
                .addChild(new ExampleEntity(4L, "Four"))
                .addChild(new ExampleEntity(5L, "Five"))
                .addChild(new ExampleEntity(6L, "Six"));

        ListTreeModel<ExampleEntity> modelB = new ListTreeModel<>();
        modelB.addChild(new ExampleEntity(1L, "One"))
                .addChild(new ExampleEntity(2L, "Two")).getParent()
                .addChild(new ExampleEntity(3L, "Three")).getParent()
                .getParent()
                .addChild(new ExampleEntity(4L, "Four"))
                .addChild(new ExampleEntity(5L, "Five"))
                .addChild(new ExampleEntity(6L, "Six"));

        if (modelA.equals(modelB)) {
            LOGGER.debug("The same model");
        }

BalusC added a commit that referenced this issue Sep 17, 2017

@BalusC BalusC closed this Sep 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment