| Summary: | QVTo property of type dictionary of string to enumeration crashes | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] QVTo | Reporter: | Dennis Hendriks <dh_tue> | ||||
| Component: | Engine | Assignee: | Sergey Boyko <serg.boyko2011> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | critical | ||||||
| Priority: | P3 | CC: | dh_tue | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | R3_0_maintenance | ||||||
| Attachments: |
|
||||||
Created attachment 177510 [details]
Proposed patch
In various places processing of ImperativeOCL specified types (ListType and DictionaryType) was omitted.
Fix is committed in R3_0_maintenance branch. |
Build Identifier: Build id: 20100617-1415 (Helios) Having the following in a QVTo transformation: property DISTRIBUTION_NAME_MAP : Dict(String, StdLibFunctions) = Dict { 'Constant' = StdLibFunctions::Constant, (...) 'Weibull' = StdLibFunctions::Weibull }; where StdLibFunctions is an enumeration from the source metamodel. Running this transformation gives: java.lang.IllegalArgumentException: OCL collection kind (Collection) is not implemented in the java collection factory. at org.eclipse.ocl.util.CollectionUtil.createNewCollection(CollectionUtil.java:1079) at org.eclipse.m2m.internal.qvt.oml.evaluator.ModuleInstanceFactory.initProperties(ModuleInstanceFactory.java:164) at org.eclipse.m2m.internal.qvt.oml.evaluator.ModuleInstanceFactory.basicCreateModuleInstance(ModuleInstanceFactory.java:135) at org.eclipse.m2m.internal.qvt.oml.evaluator.ModuleInstanceFactory.createModuleInstance(ModuleInstanceFactory.java:107) at org.eclipse.m2m.internal.qvt.oml.evaluator.ModuleInstanceFactory.basicCreate(ModuleInstanceFactory.java:92) at org.eclipse.m2m.internal.qvt.oml.evaluator.ModuleInstanceFactory.create(ModuleInstanceFactory.java:80) at org.eclipse.m2m.internal.qvt.oml.evaluator.QvtOperationalEvaluationVisitorImpl.callTransformationImplicitConstructor(QvtOperationalEvaluationVisitorImpl.java:868) at org.eclipse.m2m.internal.qvt.oml.evaluator.QvtOperationalEvaluationVisitorImpl.doVisitTransformation(QvtOperationalEvaluationVisitorImpl.java:890) at org.eclipse.m2m.internal.qvt.oml.evaluator.QvtOperationalEvaluationVisitorImpl.visitModule(QvtOperationalEvaluationVisitorImpl.java:750) at org.eclipse.m2m.internal.qvt.oml.evaluator.QvtGenericEvaluationVisitor.visitModule(QvtGenericEvaluationVisitor.java:396) at org.eclipse.m2m.internal.qvt.oml.expressions.impl.ModuleImpl.accept(ModuleImpl.java:632) at org.eclipse.m2m.internal.qvt.oml.runtime.project.QvtInterpretedTransformation.evaluate(QvtInterpretedTransformation.java:177) at org.eclipse.m2m.internal.qvt.oml.runtime.project.QvtInterpretedTransformation.run(QvtInterpretedTransformation.java:118) at org.eclipse.m2m.internal.qvt.oml.runtime.launch.QvtLaunchConfigurationDelegateBase.doLaunch(QvtLaunchConfigurationDelegateBase.java:184) at org.eclipse.m2m.internal.qvt.oml.runtime.launch.QvtLaunchConfigurationDelegateBase.doLaunch(QvtLaunchConfigurationDelegateBase.java:139) at org.eclipse.m2m.internal.qvt.oml.runtime.launch.QvtLaunchConfigurationDelegate$1.run(QvtLaunchConfigurationDelegate.java:65) at org.eclipse.m2m.internal.qvt.oml.common.launch.SafeRunner$SameThreadRunner.run(SafeRunner.java:33) at org.eclipse.m2m.internal.qvt.oml.common.launch.SafeRunner$1.run(SafeRunner.java:26) at org.eclipse.m2m.internal.qvt.oml.common.launch.ShallowProcess.run(ShallowProcess.java:41) at org.eclipse.m2m.internal.qvt.oml.common.launch.ShallowProcess.run(ShallowProcess.java:32) at org.eclipse.m2m.internal.qvt.oml.runtime.launch.QvtLaunchConfigurationDelegate$3.run(QvtLaunchConfigurationDelegate.java:98) at java.lang.Thread.run(Unknown Source) Additional info: eclipse.buildId=I20100608-0911 java.version=1.6.0_11 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US Framework arguments: -product org.eclipse.epp.package.modeling.product Command-line arguments: -os linux -ws gtk -arch x86 -product org.eclipse.epp.package.modeling.product Note that commenting out this property (which I didn't yet use), makes the transformation execute just fine again... Reproducible: Always Steps to Reproduce: 1. Define a property of type Dict(String, <some enum>), and give it a value 2. Run the transformation and observe the crash.