ClassCastException when localizing void type

Issue #534 resolved
Matthias Schoettle created an issue

The following ClassCastException occurs when setLocalizePropertyValue is called for a non-COREModelElement (such as void or any):

Caused by: java.lang.ClassCastException: ca.mcgill.sel.ram.impl.RVoidImpl cannot be cast to ca.mcgill.sel.core.COREModelElement
    at ca.mcgill.sel.ram.provider.util.RAMReferenceUtil.setLocalizedPropertyValue(RAMReferenceUtil.java:71)
    at ca.mcgill.sel.ram.provider.OperationItemProvider$1.setPropertyValue(OperationItemProvider.java:301)
    at ca.mcgill.sel.ram.ui.views.handler.impl.TextViewHandler.setValue(TextViewHandler.java:77)
    at ca.mcgill.sel.ram.ui.views.handler.impl.TextViewHandler$1.elementSelected(TextViewHandler.java:56)

Comments (4)

  1. Matthias Schoettle reporter

    Resolves #534: Relaxes cast for setLocalizedPropertyValue to allow setting of non COREModelElement instances.

    For example, void or any are not COREModelElements.

    Adds two test cases to cover this.

    → <<cset ddf1e89421ec>>

  2. Log in to comment