Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 519308

Summary: AbstractContentPart#reorderContentChild always fails
Product: [Tools] GEF Reporter: David Dubrow <ddubrow>
Component: GEF MVCAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: matthias.wienand, miklossy
Version: unspecified   
Target Milestone: 5.0.1 (Oxygen.1) M1   
Hardware: All   
OS: All   
Whiteboard:

Description David Dubrow CLA 2017-07-06 08:42:04 EDT
if (oldContentChildren.contains(contentChild)) {
	throw new IllegalArgumentException("Cannot reorder " + contentChild
			+ " because its not a content child.");
}

The above check will cause all valid cases to fail. Should be:
if (!oldContentChildren.contains(contentChild)...
Comment 1 Tamas Miklossy CLA 2017-07-14 10:49:16 EDT
Thank you for the bug report!

I fixed the issue by negating the condition (according to your suggestion). The changes are published on the origin/R5_0_0_maintenance and origin/master branches. Therefore, I resolve this ticket as fixed for Oxygen.1 (the target milestone still needs to be added).

 [519308] Fix guard within reorderContentChild.

- Reordering could not have worked with the faulty guard as it throws an
  error when the given content object is a content child.
- This fix negates the condition.
- Moreover, the error messages are enhanced, using "it is" instead of
  "its".
- The versions of all related projects have been incremented to 5.0.1.