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

Bug 329686

Summary: Unable to delete a EClass when generics settings are invalid
Product: [Modeling] EMF Reporter: Goulwen Le Fur <goulwen.lefur>
Component: EditAssignee: Dave Steinberg <davidms>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Ed.Merks
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
The invalid model none

Description Goulwen Le Fur CLA 2010-11-08 11:30:42 EST
Created attachment 182633 [details]
The invalid model

In the sample model in attachment I'm not able to delete any EClass because of  invalid EGenerics in this model. A NPE is thrown :

 Caused by: java.lang.NullPointerException
	at org.eclipse.emf.ecore.impl.EClassImpl$1EGenericSuperTypeEList.equivalent(EClassImpl.java:441)
	at org.eclipse.emf.ecore.impl.EClassImpl$1EGenericSuperTypeEList.eliminateEquivalentDuplicates(EClassImpl.java:415)
	at org.eclipse.emf.ecore.impl.EClassImpl.getEAllGenericSuperTypes(EClassImpl.java:514)
	at org.eclipse.emf.ecore.impl.EClassImpl.eGet(EClassImpl.java:1012)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1021)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1013)
	at org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImpl.hasNext(EContentsEList.java:409)
	at org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImpl.next(EContentsEList.java:565)
	at org.eclipse.emf.ecore.util.EcoreUtil$CrossReferencer.handleCrossReference(EcoreUtil.java:1696)
	at org.eclipse.emf.ecore.util.EcoreUtil$CrossReferencer.crossReference(EcoreUtil.java:1672)
	at org.eclipse.emf.ecore.util.EcoreUtil$UsageCrossReferencer.findAllUsage(EcoreUtil.java:2518)
	at org.eclipse.emf.ecore.util.EcoreUtil$UsageCrossReferencer.findAll(EcoreUtil.java:2601)
	at org.eclipse.emf.edit.command.DeleteCommand.findReferences(DeleteCommand.java:178)
	at org.eclipse.emf.edit.command.DeleteCommand.execute(DeleteCommand.java:137)
	at org.eclipse.emf.common.command.BasicCommandStack.execute(BasicCommandStack.java:84)
Comment 1 Ed Merks CLA 2010-11-12 08:33:08 EST
The fix is committed to CVS for 2.7.
Comment 2 Ed Merks CLA 2010-12-13 16:42:48 EST
The fixes are available in a published build.
Comment 3 Ed Merks CLA 2010-12-14 23:28:09 EST
Try again to resolve as fixed (and available in a build).
Comment 4 Ed Merks CLA 2010-12-14 23:29:47 EST
Oh, I guess I have to close them!