GraphLayout counts duplicate roots multiple times

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • None
    • Affects Version/s: None
    • Component/s: tools
    • None
    • jol

      If you do:

              Object r = new Object();
              GraphLayout gl1 = GraphLayout.parseInstance(r);
              GraphLayout gl2 = GraphLayout.parseInstance(r, r);

      ...then this would unexpectedly fail:

              Assert.assertEquals(gl1.totalCount(), gl2.totalCount());
              Assert.assertEquals(gl1.totalSize(), gl2.totalSize());

      This is because GraphWalker counts these separate roots as separate objects, which should not happen.

            Assignee:
            Aleksey Shipilev
            Reporter:
            Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: