Community
Participate
Working Groups
Created attachment 266004 [details] Test to reproduce For some reasons, the genmodel can be unsynchronized with the ecore and can have a GenFeature without EcoreFeature. In this situation that we add for a Sirius user : https://bugs.eclipse.org/bugs/show_bug.cgi?id=509565 an NPE is thrown if we do a call of the method org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.getLabelFeature() in the sub method org.eclipse.emf.codegen.ecore.genmodel.impl.GenTypedElementImpl.isListType() in the return because the eTypedElement is null. A null check at this point would avoid the NPE and the impact it can have with Sirius integration. I attached a basic project for reproduction. To reproduce : - Run application mymy.TestClass.main(String[])
The same problem is also present for org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.getName() where we do the getEcoreFeature().getName() without null check
(In reply to Pierre Guilet from comment #1) > The same problem is also present for > org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.getName() where > we do the getEcoreFeature().getName() without null check Don't mind this comment it has been fixed in master
New Gerrit change created: https://git.eclipse.org/r/87571
The equivalent fix is committed to master: http://git.eclipse.org/c/emf/org.eclipse.emf.git/commit/?id=73b39ab6bcb3ed81e68973d9de415206a563c315
The fixes are all the 2.13 release in Oxygen.