Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 510893 - Improper unload of in-memory resources
Summary: Improper unload of in-memory resources
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 4.0.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.1.3   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 510928 521236
  Show dependency tree
 
Reported: 2017-01-23 12:06 EST by William Piers CLA
Modified: 2017-08-22 05:46 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 William Piers CLA 2017-01-23 12:06:18 EST
Since  https://github.com/pcdavid/org.eclipse.sirius/commit/de35505b28c6c6f5d583f3616950708e36b02b73 optimization, in-memory resources are inproperly loaded.

In
https://github.com/pcdavid/org.eclipse.sirius/blob/master/plugins/org.eclipse.sirius/src/org/eclipse/sirius/tools/internal/resource/InMemoryResourceImpl.java

the unload calls
   protected void doUnload() {
        super.doUnload();
        URI uri = getURI();
        InMemoryResourceFactoryImpl.IN_MEMORY_BUFFERS.remove(uri);
    }

If the uri is not removed, then the cache returns old closed sessions resources.
Comment 1 Eclipse Genie CLA 2017-01-24 05:01:19 EST
New Gerrit change created: https://git.eclipse.org/r/89408
Comment 3 Pierre-Charles David CLA 2017-01-25 04:34:14 EST
Fixed by c5596667a936047e4c5344b516f4d5c5c6e3618c.
Comment 4 Maxime Porhel CLA 2017-01-27 04:01:13 EST
Verified on Sirius 4.1.3.201701261703
Comment 5 Pierre-Charles David CLA 2017-01-31 03:48:32 EST
Available in Sirius 4.1.3, see https://wiki.eclipse.org/Sirius/4.1.3 for version details.