Commit cb65ef96 authored by Martti Käärik's avatar Martti Käärik
Browse files

OCL Java code generator optimizes away the first condition "not...

OCL Java code generator optimizes away the first condition "not self.container().oclIsUndefined()" because it thinks that "self.container()" can never be null although the return value is marked optional (assuming a bug in Pivot OCL)
parent dd09570a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
    </eOperations>
    <eOperations name="getParentTestDescription" eType="#//TestDescription">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="  &#xA;            if (not self.container().oclIsUndefined()) then&#xA;                if (self.container().oclIsKindOf(TestDescription)) then&#xA;                    self.container().oclAsType(TestDescription)&#xA;                else&#xA;                    self.container().getParentTestDescription()&#xA;                endif&#xA;            else &#xA;                null&#xA;            endif"/>
        <details key="body" value="  &#xA;            if (self.oclContainer().oclIsUndefined()) then&#xA;                null&#xA;            else &#xA;                if (self.container().oclIsKindOf(TestDescription)) then&#xA;                    self.container().oclAsType(TestDescription)&#xA;                else&#xA;                    self.container().getParentTestDescription()&#xA;                endif&#xA;            endif"/>
      </eAnnotations>
    </eOperations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="comment" upperBound="-1"