- changed milestone to Introduction
- removed responsible
Static reference for metaclass lifeline not removed
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)
-
reporter -
-
assigned issue to
-
assigned issue to
-
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 tob()
- 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?
- Create a class
-
reporter Ouch, that seems to have slipped in with the latest message view improvements (pull request #94).
It is not related to this issue.
-
References
#444: Moves the static reference removal to the removeUnusedLifelines method→ <<cset 8bf2ec1716d6>>
-
References
#444: Adds a removeMessage shortcut method in FragmentsController→ <<cset f51a1a10c7bc>>
-
References
#444: Improves test case for static references removal, removes unused test util methods→ <<cset 9f48495986c3>>
-
References
#444: Simplifies the test case for reference removal→ <<cset 9b5ceb4856b9>>
-
References
#444: Adds the 'multiple lifelines of the same type' case to the test case→ <<cset c70ae41f92ac>>
-
References
#444: Adds the test data for the new testRemoveStaticReferences test case→ <<cset 89c088933008>>
-
References
#444: Checks if a type is not referenced before removing its reference.→ <<cset 2f697629c580>>
-
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>>
- Log in to comment
Could be a candidate for new developer to practice adding a test case first, then resolving the issue.