Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7902580

GraphLayout counts duplicate roots multiple times

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • None
    • None
    • 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.

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

              Created:
              Updated:
              Resolved: