Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2022-01-16 09:10:29 +0000
committerEike Stepper2022-01-16 09:10:29 +0000
commit6e4a104c36918dcee72862b04b42f05a71ee05a0 (patch)
tree3c5c5e3c93f821dd9f740c90a7bd73fcada7a4f9
parent93857f5b43994947e747d6de68b37f0415defde7 (diff)
downloadcdo-6e4a104c36918dcee72862b04b42f05a71ee05a0.tar.gz
cdo-6e4a104c36918dcee72862b04b42f05a71ee05a0.tar.xz
cdo-6e4a104c36918dcee72862b04b42f05a71ee05a0.zip
[538089] Resource permission does not handle well spaces in resource URIreleases/4.17.0
https://bugs.eclipse.org/bugs/show_bug.cgi?id=538089
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ResourceTest.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ResourceTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ResourceTest.java
index 93eae05e4f..4a654b1b4c 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ResourceTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ResourceTest.java
@@ -20,6 +20,7 @@ import org.eclipse.emf.cdo.common.lob.CDOBlob;
import org.eclipse.emf.cdo.common.lob.CDOClob;
import org.eclipse.emf.cdo.common.revision.CDORevision;
import org.eclipse.emf.cdo.common.revision.CDORevisionData;
+import org.eclipse.emf.cdo.common.revision.CDORevisionUtil;
import org.eclipse.emf.cdo.common.util.CDODuplicateResourceException;
import org.eclipse.emf.cdo.eresource.CDOBinaryResource;
import org.eclipse.emf.cdo.eresource.CDOResource;
@@ -881,6 +882,20 @@ public class ResourceTest extends AbstractCDOTest
}
}
+ public void testPathWithSpaces() throws Exception
+ {
+ CDOSession session = openSession();
+ CDOTransaction transaction = session.openTransaction();
+ CDOResource resource = transaction.createResource(getResourcePath("/a path with spaces"));
+ assertEquals(getResourcePath("/a path with spaces"), resource.getPath());
+ assertEquals(createResourceURI(session, getResourcePath("/a path with spaces")), resource.getURI());
+
+ transaction.commit();
+ assertEquals(getResourcePath("/a path with spaces"), resource.getPath());
+ assertEquals(getResourcePath("/a path with spaces"), CDORevisionUtil.getResourceNodePath(resource.cdoRevision(), transaction));
+ assertEquals(createResourceURI(session, getResourcePath("/a path with spaces")), resource.getURI());
+ }
+
public void testPrefetchContents() throws Exception
{
{

Back to the top