Community
Participate
Working Groups
A genmodel with runtime version set to 2.4 can generate a broken validator class in EMF 2.6: a validate method references the method validate_EveryBidirectionalReferenceIsPaired, which is available only since 2.6 (?). This happens because of the structure of the following if-statement in GenClassImpl.getIntrinsicConstraints: if (runtimeVersion <= GenRuntimeVersion.EMF22_VALUE) { result.remove("EveryKeyUnique"); result.remove("EveryMapEntryUnique"); } else if (runtimeVersion < GenRuntimeVersion.EMF25_VALUE) { result.remove("NoCircularContainment"); } else if (runtimeVersion < GenRuntimeVersion.EMF26_VALUE) { result.remove("EveryBidirectionalReferenceIsPaired"); } To me it seems - without knowing the history - that both "else" are wrong and should be removed, so that there are three distinct if statements (emulating a switch with fall-through).
*** This bug has been marked as a duplicate of bug 324207 ***