mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged BRANCHES/V3.3 to HEAD:
20192: Merged PATCHES/V3.1.2 to BRANCHES/V3.3: 20182: Fixed ALF-2712: Performance degradation from 3.1.0 to 3.1.2 20207: Merged PATCHES/V3.1.2 to BRANCHES/V3.3: 20203: Fix fallout from ALF-2712 ... move back to no results rather than AccessDeniedException 20222: Merged PATCHES/V3.2.1 to BRANCHES/V3.3: 20212: Fix ALF-2719: 'patch.convertContentUrls' can result in "No ContentData value exists for ID" errors git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20226 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -28,6 +28,7 @@ import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
@@ -402,15 +403,13 @@ public class ScriptNode implements Serializable, Scopeable, NamespacePrefixResol
|
||||
StringTokenizer t = new StringTokenizer(path, "/");
|
||||
if (t.hasMoreTokens())
|
||||
{
|
||||
List<String> names = new ArrayList<String>(1);
|
||||
names.add(null); // ensure first element is set
|
||||
result = this.nodeRef;
|
||||
while (t.hasMoreTokens() && result != null)
|
||||
{
|
||||
names.set(0, t.nextToken());
|
||||
List<ChildAssociationRef> children = this.nodeService.getChildrenByName(
|
||||
result, ContentModel.ASSOC_CONTAINS, names);
|
||||
result = (children.size() == 1 ? children.get(0).getChildRef() : null);
|
||||
String name = t.nextToken();
|
||||
List<ChildAssociationRef> results = this.nodeService.getChildrenByName(
|
||||
result, ContentModel.ASSOC_CONTAINS, Collections.singletonList(name));
|
||||
result = (results.size() > 0 ? results.get(0).getChildRef() : null);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user