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

GraphLayout counts duplicate roots multiple times

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
      jol

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: