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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • None
    • None
    • 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;
           }

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

              Created:
              Updated:
              Resolved: