Further fix for ACE-2932 to allow the UI to post pseudo-qname strings like "Site" or "Tag".

Without this fix, strings with no leading "{}" are rejected as not being recognised as QNames.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@86035 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Neil McErlean
2014-09-30 15:21:08 +00:00
parent e2dded6a18
commit 5d1fc74367
2 changed files with 17 additions and 2 deletions

View File

@@ -74,7 +74,14 @@ public class FacetQNameUtilsTest
FacetQNameUtils.createQName("{http://www.alfresco.org/model/foo/1.0}localName", resolver));
}
// Note: it doesn't really make sense to have a short-form qname with no prefix.
@Test public void canCreateFromShortFormWithNoPrefix() throws Exception
{
// The sensibleness of this from an Alfresco perspective is questionable.
// But this is what we must do to support 'QName' strings like "Site" or "Tag" in the REST API.
assertEquals(QName.createQName(null, "localName"),
FacetQNameUtils.createQName("localName", resolver));
}
@Test public void canCreateFromLongFormWithNoPrefix() throws Exception
{
assertEquals(QName.createQName(null, "localName"),