Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEsteban Dugueperoux2015-05-28 13:45:56 +0000
committerEike Stepper2015-06-02 11:54:02 +0000
commit9c5cf3645ca9464088ecbf3e9ee2ca44acc6f4b5 (patch)
treeade6553b8d99c23db88851482daaa4c01bb710a1
parent66a08f9ed3d9a8dfc22dd92066e7829547e350d0 (diff)
downloadcdo-9c5cf3645ca9464088ecbf3e9ee2ca44acc6f4b5.tar.gz
cdo-9c5cf3645ca9464088ecbf3e9ee2ca44acc6f4b5.tar.xz
cdo-9c5cf3645ca9464088ecbf3e9ee2ca44acc6f4b5.zip
[468602] IllegalArgumentException: path is empty on root CDOResource
Have CDOURIUtil.extractResourcePath() returns "/" as before commit "e5a4f78c481f623858f6cb4ca9d6c3890ab7025a : [467442] Add Interactive Transaction Conflict Resolution" to avoid IllegalArgumentException. Change-Id: I219963c61f7218503c9e16e3dcd61ca7e57e084a Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=468602 Signed-off-by: Esteban Dugueperoux <esteban.dugueperoux@obeo.fr> Signed-off-by: Eike Stepper <stepper@esc-net.de>
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOURIData.java4
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOURIUtil.java2
2 files changed, 5 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOURIData.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOURIData.java
index 62df8008af..e2ddec8fa8 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOURIData.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOURIData.java
@@ -135,6 +135,10 @@ public final class CDOURIData
IPath path = new Path(uri.path()).makeAbsolute();
repositoryName = path.segment(0);
resourcePath = path.removeFirstSegments(1);
+ if (resourcePath == null || resourcePath.isEmpty())
+ {
+ resourcePath = new Path(CDOURIUtil.SEGMENT_SEPARATOR);
+ }
String query = uri.query();
if (query != null && query.length() != 0)
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOURIUtil.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOURIUtil.java
index b4bcddbbe4..95d58f93d3 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOURIUtil.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOURIUtil.java
@@ -137,7 +137,7 @@ public final class CDOURIUtil
{
CDOViewProvider2 viewProvider = (CDOViewProvider2)viewProviders[i];
String path = viewProvider.getPath(uri);
- if (path != null)
+ if (path != null && !StringUtil.isEmpty(path))
{
return path;
}

Back to the top