Community
Participate
Working Groups
When setting/unsetting the value of a reference (from null to someting or something to null), the value referenced by the UpdateReference instance are the same. It appears that in the ReferencesCheck#createUpdatedReferenceOperation(EObject, EObject, EReference, EObject, EObject), the left/right targets are set to deleted/added values by only testing their nullity. The added/deleted values MUST be checked for nullity before assigning deleted/added values respectively to left/right targets. Here is the patch: == before == EObject leftTarget = getMatchedEObject(addedValue); EObject rightTarget = getMatchedEObject(deletedValue); // checks if target are defined remotely if (leftTarget == null) { leftTarget = deletedValue; } if (rightTarget == null) { rightTarget = addedValue; } == after == EObject leftTarget = getMatchedEObject(addedValue); EObject rightTarget = getMatchedEObject(deletedValue); // checks if target are defined remotely if (leftTarget == null && addedValue != null) { leftTarget = deletedValue; } if (rightTarget == null && deletedValue != null) { rightTarget = addedValue; }
Trivial fix commited on HEAD