Static reference for metaclass lifeline not removed

Issue #444 resolved
Matthias Schoettle created an issue

Given a call to a metaclass lifeline (which is represented by a static Reference contained in the Interaction). When the lifeline is removed, the static reference is not removed, which causes problems when the corresponding class is removed.

Not exactly sure anymore, why that reference is added to the Interaction and not the Message, but it needs to be removed with the lifeline.

A test case needs to be added to cover this problem.

Comments (12)

  1. Matthias Schoettle reporter

    Could be a candidate for new developer to practice adding a test case first, then resolving the issue.

  2. Emmanuel Ng Cheng Hin

    I realized that deletions of calls to static methods are not undone properly. Steps to reproduce:

    • Create a class A
    • Add a method A.a()
    • Create a class B
    • Add a static method B.b()
    • In method a() add a message to b()
    • Delete the message
    • Click on the undo button

    This issue seems to be also present on the master branch. Should this be fixed in this issue?

  3. Matthias Schoettle reporter

    References #444: Fixes remaining issue for unused reference removal.

    The reference is removed after the lifeline and only in case of it being contained by the interaction (indicating that it is one belonging to a static reference).

    The tests are split into two separate ones. One static lifeline with one message, and the other with a static lifeline and two messages.

    → <<cset 1dcb77859fcc>>

  4. Log in to comment