Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] Error in LoopUnitImpl

Hi,

the fix is commited. Luckily, I already had this one hiding under a pile of other changes :)

Regards,
Gregor

Am 23.02.2012 15:59, schrieb Claudia Ermel:
Hi Gregor,

there is an error in Revision 1360 in LoopUnitImpl.java when you are trying to cast a SingletonList to an EList:

    public EList<TransformationUnit> getSubUnits() {
        if (subUnit!=null) {
return (EList<TransformationUnit>) Collections.singletonList(subUnit);
        } else {
            return ECollections.emptyEList();
        }
    }

java.lang.ClassCastException: java.util.Collections$SingletonList cannot be cast to org.eclipse.emf.common.util.EList at org.eclipse.emf.henshin.model.impl.LoopUnitImpl.getSubUnits(LoopUnitImpl.java:111) at org.eclipse.emf.henshin.model.impl.TransformationUnitImpl.getSubUnits(TransformationUnitImpl.java:197) at de.tub.tfs.henshin.editor.util.DialogUtil.runTransformationUnitChoiceForAddUnitDialog(DialogUtil.java:275) at de.tub.tfs.henshin.editor.actions.transformation_unit.AddTransformationUnitAction.run(AddTransformationUnitAction.java:89)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)


The error does not exist in Revision 1356 (the one before), so please revert to this revision:

    public EList<TransformationUnit> getSubUnits() {
        if (subUnit!=null) {
return (EList<TransformationUnit>) ECollections.singletonEList(subUnit);
        } else {
            return ECollections.emptyEList();
        }
    }

Greetx,
Claudia und Jürgen




Back to the top