Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 346602 - ResourceDependencyChange references resources in the wrong direction
Summary: ResourceDependencyChange references resources in the wrong direction
Status: CLOSED FIXED
Alias: None
Product: EMFCompare
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: EMF Compare CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-20 04:26 EDT by Mikaël Barbero CLA
Modified: 2011-05-23 08:48 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikaël Barbero CLA 2011-05-20 04:26:56 EDT
There is a bug in the direction of the dependency changes. Added dependencies are marked as removed and vice versa.

The bug is located in the static method: DiffResourceSet DiffService#doDiff(MatchResourceSet, boolean)

== before ==

if (unmatch.getSide() == Side.LEFT) {
	dependencyChange = DiffFactory.eINSTANCE.createResourceDependencyChangeRightTarget();
} else {
	dependencyChange = DiffFactory.eINSTANCE.createResourceDependencyChangeLeftTarget();
}

== after ==

if (unmatch.getSide() == Side.LEFT) {
	dependencyChange = DiffFactory.eINSTANCE.createResourceDependencyChangeLeftTarget();
} else {
	dependencyChange = DiffFactory.eINSTANCE.createResourceDependencyChangeRightTarget();
}
Comment 1 Laurent Goubet CLA 2011-05-23 08:48:53 EDT
This is a regression ... dating back all the way to 2009 :S. This trivial fix will be available in RC2.