Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364005 - WorkspaceSynchronizer doesn't checks that URI is not a platform resource URI
Summary: WorkspaceSynchronizer doesn't checks that URI is not a platform resource URI
Status: CLOSED MOVED
Alias: None
Product: EMF Services
Classification: Modeling
Component: Transaction (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 major
Target Milestone: ---   Edit
Assignee: EMF Services Transaction inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-17 03:33 EST by Esteban DUGUEPEROUX CLA
Modified: 2022-09-04 12:16 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Esteban DUGUEPEROUX CLA 2011-11-17 03:33:47 EST
Build Identifier: Eclipse 3.6.1


In the context of CDO and GMF, we have many calls to WorkspaceSynchronizer.getFile(Resource) with CDOResource and custom resources (some using a custom URI with a "memory" scheme) but we get some exceptions in 3.6 for example :

org.eclipse.core.runtime.CoreException: No file system is defined for scheme: memory
 at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:55)
 at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:50)
 at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getFileSystem(InternalFileSystemCore.java:65)
 at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getStore(InternalFileSystemCore.java:107)
 at org.eclipse.core.filesystem.EFS.getStore(EFS.java:470)
 at org.eclipse.core.internal.localstore.FileSystemResourceManager.findLinkedResourcesPaths(FileSystemResourceManager.java:142)
 at org.eclipse.core.internal.localstore.FileSystemResourceManager.allPathsForLocationNonCanonical(FileSystemResourceManager.java:124)
 at org.eclipse.core.internal.localstore.FileSystemResourceManager.allPathsForLocation(FileSystemResourceManager.java:62)
 at org.eclipse.core.internal.localstore.FileSystemResourceManager.allResourcesFor(FileSystemResourceManager.java:216)
 at org.eclipse.core.internal.resources.WorkspaceRoot.findFilesForLocationURI(WorkspaceRoot.java:113)
 at org.eclipse.core.internal.resources.WorkspaceRoot.findFilesForLocationURI(WorkspaceRoot.java:104)
 at org.eclipse.emf.workspace.util.WorkspaceSynchronizer.getFile(WorkspaceSynchronizer.java:357)
 at org.eclipse.emf.workspace.util.WorkspaceSynchronizer.getFile(WorkspaceSynchronizer.java:270)

Indeed at line 360 of WorkspaceSynchronizer where we have result == null we don't checks that the normalized URI is a platform resource URI. 

Reproducible: Always
Comment 1 Pierre-Charles David CLA 2022-05-14 09:51:51 EDT
Eclipse EMF Transaction is moving away from this bugs.eclipse.org issue tracker to https://github.com/eclipse/emf-transaction.

If this issue is relevant to you and still present in the latest release:

* Create a new issue at https://github.com/eclipse/emf-transaction/issues/.
  * Use as title in GitHub the title of this Bugzilla ticket (may include the bug number or not, at your own convenience)
  * In the GitHub description, start with a link to this bugzilla ticket
  * Optionally add new content to the description if it can helps towards resolution
* Update bugzilla ticket
  * Add to "See also" property (up right column) the link to the newly created GitHub issue
  * Add a comment "Migrated to <link-to-newly-created-GitHub-issue>"
  * Set status as CLOSED MOVED

All issues that remain open will be automatically closed next week or so. Then the Bugzilla component for EMF Transaction will be archived and made read-only.
Comment 2 Pierre-Charles David CLA 2022-09-04 12:16:52 EDT
Replaced with https://github.com/eclipse/emf-transaction/issues/18