mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-15 15:02:20 +00:00
Merged MNT-17845-5.2.N (5.2.2) to 5.2.N (5.2.2)
137726 jvonka: REPO-2516 - MNT-17845 : Smart Folders - node id (sys:node-uuid) that starts with 'v' - step 2 (experimental => sub-optimal) fix to also handle non-virtual node ids that happen to start with 'v0', 'vH', 'vP' (including simple unit test) - requires refactor to avoid parsing twice (ie. most usages of isReference + fromNodeRef) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@137781 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -80,7 +80,33 @@ public class Reference
|
||||
Encoding encoding = Encodings.fromToken(token);
|
||||
if (encoding != null)
|
||||
{
|
||||
return true;
|
||||
//
|
||||
// TODO experimental step 2 (sub-optimal) - remove & refactor so that we don't parse twice (for smart folder virtual ids)
|
||||
//
|
||||
try
|
||||
{
|
||||
Reference ref = fromNodeRef(nodeRef);
|
||||
if (ref != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch (ReferenceParseException rpe)
|
||||
{
|
||||
// ignore
|
||||
if (logger.isTraceEnabled())
|
||||
{
|
||||
logger.trace("Ignore parse exception: "+rpe.getMessage());
|
||||
}
|
||||
}
|
||||
catch (ReferenceEncodingException ree)
|
||||
{
|
||||
// ignore
|
||||
if (logger.isTraceEnabled())
|
||||
{
|
||||
logger.trace("Ignore encoding exception: "+ree.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user