- changed milestone to Summer 2015 "Sombrero"
-
assigned issue to
- marked as major
Crash when calling constructor on static associations end.
Issue #344
resolved
Normally we cannot call constructors in message view, except on metaClasses. But in the case of a static association end, constructors will be callable. However, this should not be possible.
Steps to reproduce:
- Map any class to Singleton
- In any operation of this class try to call the create() operation on the singleton instance.
This results in a ClassCastException:
Exception in thread "Animation Thread" java.lang.ClassCastException: ca.mcgill.sel.ram.impl.AssociationEndImpl cannot be cast to ca.mcgill.sel.ram.Reference
at ca.mcgill.sel.ram.controller.MessageViewController.createSingleMessageCommand(MessageViewController.java:449)
at ca.mcgill.sel.ram.controller.MessageViewController.createMessageCommand(MessageViewController.java:306)
Comments (3)
-
-
- changed milestone to Summer 2015 "Bellissimo"
-
Resolves
#344: Fixes the ClassCastException when a constructor is called on an existing static reference. This should be allowed, because the end result is the same as calling the constructor on the metaclass and assigning it to that static association.→ <<cset bfeac7ac22d4>>
- Log in to comment