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

Bug 353217

Summary: NPE during copy of references in EMFCompareEObjectCopier
Product: [Modeling] EMFCompare Reporter: Cedric Notot <cedric.notot>
Component: CoreAssignee: EMF Compare <emf.compare-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: laurent.goubet
Version: 1.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Cedric Notot CLA 2011-07-27 10:54:48 EDT
Build Identifier: 20110615-0604

When an object which is not embedded in a resource is given to the findReferencedObjectCopy() method of EMFCompareEObjectCopier class, a NPE is thwrown.

Reproducible: Always

Steps to Reproduce:
1. Compare a model "M" which owns an object "A" which references an EPackage "B" of an ecore model.
2. Merge the object A in the model M' from M.
3. NPE will be thrown during the merge (copy) of the linked EPackage B because the eReference "eFactoryInstance" returns an EFactory which is not in a Resource.
Comment 1 Laurent Goubet CLA 2011-08-09 04:33:19 EDT
The match, diff and merge process have seen a great deal of improvement in the past week, with the addition of unit tests for most of the different use cases (one use case = one possible "diff" between models) we could think of.

The particular issue of NPEs when merging objects not contained in a resource (such as the factory instance this bug is about) is one of the things that has been tested and fixed.

These changes have been pushed on both master and the 1.2 maintenance stream. They are available in the builds
 - 1.2 integration : I201108090404
 - 1.3 integration : I201108090415