Community
Participate
Working Groups
When Sirius tries to open an odesign that it cannot load, for example if the odesign has been migrated with a newer version of Sirius or if the odesign is missing, the list of resources can contain null and this code can crash with a NPE: for (Resource res : resources) { try { if (res.getURI() != null && res.getURI().isPlatformResource()) { // do some stuff } } } It should be "if (res != null && res.getURI() != null ........"
New Gerrit change created: https://git.eclipse.org/r/81578
Stéphane, can you provide steps to reproduce? How does it manifest from a user's point of view? I've proposed a patch in Gerrit with the obvious test, but a proper scenario would be nice.
Steps to reproduce: * Import the attached project, it contains a modeling project with its VSM inside. * Open the Project > You will encounter the NPE mentionned by Stéphane. The VSM has been manually modified to change the version major number to 99.
Created attachment 264374 [details] Reproduction case
Gerrit change https://git.eclipse.org/r/81578 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=1538f922fcdd4fdac25158dfe2ec8efa067bf7a2
Fixed.
Available in Sirius 4.1.0, see https://wiki.eclipse.org/Sirius/4.1.0 for details.