GraphLayout.add modifies "this", while should add to result

XMLWordPrintable

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

      Reported off-list by Veselin Perovic.

          public GraphLayout add(GraphLayout another) {
              GraphLayout res = new GraphLayout();
              for (Map.Entry<Long, GraphPathRecord> e : addresses.entrySet()) {
                  addRecord(e.getValue()); // <--- should be adding to res
              ...
              return res;
           }

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

              Created:
              Updated:
              Resolved: